Skip to content

Instantly share code, notes, and snippets.

@StoneCypher
Last active August 29, 2015 14:08
Show Gist options
  • Select an option

  • Save StoneCypher/39819e57a9f4637f0a9a to your computer and use it in GitHub Desktop.

Select an option

Save StoneCypher/39819e57a9f4637f0a9a to your computer and use it in GitHub Desktop.
/** @jsx React.DOM */
'use strict';
var React = require('react/addons'),
Planet = require('gamecontrols/planet'), // just pretend
Vortex = require('gamecontrols/vortex'), // just pretend
Nebula = require('gamecontrols/nebula'), // just pretend
Ship = require('gamecontrols/planet'); // just pretend
module.exports = React.createClass({
render: function() {
var Objects = [],
GameState = this.fctx().gamestate,
ItemAdd = function(Item, Index) {
Objects.push(React.createDescriptor(Item.item_type, Item.item_props));
},
ObjPlaces = GameState.drawables;
ObjPlaces.map(function(Place) {
GameState[Place].map(function(GameItem)
ItemAdd(GameItem);
);
});
return (<div className="GameMap">{Objects}</div>);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment