diff --git a/Examples/TicTacToe/TicTacToeApp.js b/Examples/TicTacToe/TicTacToeApp.js index f4d0687af..92775f78d 100755 --- a/Examples/TicTacToe/TicTacToeApp.js +++ b/Examples/TicTacToe/TicTacToeApp.js @@ -118,6 +118,17 @@ var Cell = React.createClass({ } }, + imageStyle() { + switch (this.props.player) { + case 1: + return styles.imageX; + case 2: + return styles.imageO; + default: + return {}; + } + }, + textContents() { switch (this.props.player) { case 1: @@ -147,7 +158,7 @@ var Cell = React.createClass({ underlayColor="transparent" activeOpacity={0.5}> - + ); @@ -293,6 +304,17 @@ var styles = StyleSheet.create({ color: '#b9dc2f', }, + // CELL IMAGE + + imageX: { + width: 34, + height: 42, + }, + imageO: { + width: 45, + height: 41, + }, + // GAME OVER overlay: {