You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
767 B
29 lines
767 B
require('../../sass/board/board.scss');
|
|
|
|
import { Component } from 'react';
|
|
import Scorebar from './Scorebar';
|
|
import Titlebar from './Titlebar';
|
|
import Grid from './Grid';
|
|
import Message from './Message';
|
|
import Muncher from './Muncher';
|
|
import Input from './Input';
|
|
|
|
module.exports = React.createClass({
|
|
componentDidMount() {
|
|
window.addEventListener('keydown', Input.keydown.bind(this));
|
|
},
|
|
|
|
componentWillUnmount() {
|
|
window.removeEventListener('keydown', Input.keydown.bind(this));
|
|
},
|
|
|
|
render() {
|
|
return (<div className='board'>
|
|
<Scorebar />
|
|
<Titlebar />
|
|
<Message />
|
|
<Grid width='3' height='3' ref='grid' />
|
|
<Muncher ref='muncher' />
|
|
</div>);
|
|
}
|
|
});
|
|
|