Git Product home page Git Product logo

edmmo-rails's Introduction

README

– Deployment

  • push to heroku

  • run ‘heroku run rake db:migrate’

  • run ‘rake secret’ and copy the generated string

  • run ‘heroku config:set SECRET_TOKEN=’ + paste the generated string

– Building the interpreter

  • Use the build_skulpt rake task

  • Usage: rake build_skulpt [testing=true]

  • testing=true is an optional argument that will build using the paths for the test API

Frontend Documentation

Everything lives under the Bq namespace. Here is some stuff to look at:

Bq {                                                                                                                                                                               
  mapData               : the MapData object. see below                                                                                                                            
  - setMapData(data)    : obvious                                                                                                                                                  
  playerData            : the player data object (currently anonymous).                                                                                                            
  - setPlayerData(data) : obvious                                                                                                                                                  
  + log(msg)            : print msg to the AI response panel.                                                                                                                      
  map                   : the Map object. see below                                                                                                                                
}                                                                                                                                                                                  

MapData {                                                                                                                                                                          
  data : array[25][25] of length-1 strings. the authoritative source of graphical info; everything else looks here for what should be rendered on a tile.                          
  n    : the side length of data, which is always square.                                                                                                                          
}                                                                                                                                                                                  

Map {                                                                                                                                                                              
  stage             : the Kinetic.Stage object used to render the map                                                                                                              
  bgLayer           : the Kinetic.Layer object behind the foreground layer; not really used atm.                                                                                   
  fgLayer           : the Kinetic.Layer object that the cells sit on.                                                                                                              
  - render(indices) : render each cell described by the set of indices using data from Bq.mapData.                                                                                 
}                                                                                                                                                                                  

Cell {                                                                                                                                                                             
  outer                : a Kinetic.Rect object on which the text is centered                                                                                                       
  inner                : the Kinetic.Text object that renders the character for this tile                                                                                          
  layer                : a reference to the layer that the cell sits on                                                                                                            
  + getCellById(id)    : return the cell w/ id ID.                                                                                                                                 
  + hashCellPair(x, y) : generate an id for a cell. currently returns "(x, y)"                                                                                            
  - update(opt)        : opt has keys 'outer', 'inner', and 'text'; they correspond to the fields above. will set the values of the keys in opt as the values of the fields.       
  - alert              : momentarily turn yellow. just for debugging coordinate stuff.                                                                                             
  - flash(text)        : flash the given text for 1.5 sec.                                                                                                                         
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.