diff --git a/squarenotsquare/src/screens/Game.js b/squarenotsquare/src/screens/Game.js index 106d1d5..69c7a36 100644 --- a/squarenotsquare/src/screens/Game.js +++ b/squarenotsquare/src/screens/Game.js @@ -1,13 +1,72 @@ import React from "react"; -import { Text, View } from "react-native"; +import { Text, TouchableOpacity, View } from "react-native"; +import { ScrollView } from "react-native-gesture-handler"; import { useState } from "react"; +import {genSquareChallenge} from '../libs/Random'; +import {shapes} from '../libs/ShapeEnum'; +import { styles } from "./styles/AppStyles"; +import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons'; +import Icons from '../themes/Icons'; +import Colors from "../themes/Colors"; +import Metrics from "../themes/Metrics"; function Game(props){ + const squareChallenge = genSquareChallenge(); + const [startTime, setStartTime] = useState(0); + + function generateSquare(){ + return ( + + + + ) + } + + function generateShape(index){ + return ( + + + + ) + } + + function generatePair(answer, shapeIndex) { + if (answer === 0) { + return ( + + {generateSquare()} + {generateShape(shapeIndex)} + + ); + } else { + return ( + + {generateShape(shapeIndex)} + {generateSquare()} + + ); + } + } + + function renderPairs(){ + return squareChallenge.map((pair, index) => { + return generatePair(pair.squarePos, pair.shapeType); + }); + } + return ( - - test - + + {renderPairs()} + ); }