11import React from "react" ;
22
3- import "./App.css" ;
3+ import styles from "./App.module .css" ;
44
55import { MOVE_CONFIG , MOVES , type Move } from "./constants" ;
66import MoveButton from "./MoveButton" ;
@@ -13,7 +13,7 @@ function getRandomMove(): Move {
1313
1414function getGameResult (
1515 moveA : Move ,
16- moveB : Move ,
16+ moveB : Move
1717) : [ "a" | "b" , string ] | [ "tie" , null ] {
1818 const aBeatsB = MOVE_CONFIG [ moveA ] [ moveB ] ;
1919 if ( aBeatsB != null ) {
@@ -34,7 +34,7 @@ function App() {
3434 const [ computerMove , setComputerMove ] = React . useState < Move > ( getRandomMove ( ) ) ;
3535 const [ playerMove , setPlayerMove ] = React . useState < Move | null > ( null ) ;
3636 const [ { wins, losses, draws } , setGameResults ] = React . useState < GameResults > (
37- { wins : 0 , losses : 0 , draws : 0 } ,
37+ { wins : 0 , losses : 0 , draws : 0 }
3838 ) ;
3939
4040 const handleMove = ( move : Move ) => {
@@ -57,7 +57,7 @@ function App() {
5757
5858 if ( playerMove == null ) {
5959 return (
60- < div className = "App- container centered-container" >
60+ < div className = { ` ${ styles . container } centered-container` } >
6161 < h1 > Make your move!</ h1 >
6262 { MOVES . map ( ( move , i ) => (
6363 < MoveButton
0 commit comments