Last active
May 4, 2018 01:02
-
-
Save charlee/14b0da25adac281f0b8e6c48e5848709 to your computer and use it in GitHub Desktop.
Conway's Game of Life
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.Board { | |
position: relative; | |
margin: 0 auto; | |
background-color: #000; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import './Game.css'; | |
const CELL_SIZE = 20; | |
const WIDTH = 800; | |
const HEIGHT = 600; | |
class Game extends React.Component { | |
render() { | |
return ( | |
<div> | |
<div className="Board" style={{ width: WIDTH, height: HEIGHT }}> | |
</div> | |
</div> | |
); | |
} | |
} | |
export default Game; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment