-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
103 lines (97 loc) · 3.36 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import { NavigationContainer } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";
import { useFonts } from "expo-font";
import Home from "./components/Home";
import { JoinGame } from "./components/JoinGame";
import { StartGame } from "./components/StartGame";
import WaitingForPlayers from "./components/WaitingForPlayers";
import { WaitingToStart } from "./components/WaitingToStart";
import { MarryAWord } from "./components/MarryAWord";
import { PickAWinner } from "./components/PickAWinner";
import { Winner } from "./components/Winner";
import { Gameplay } from "./components/Gameplay";
import { StoreProvider, initialState, reducer } from "./store";
export default function App() {
const [fontsLoaded] = useFonts({
"Kalam-Bold": require("./assets/fonts/Kalam-Bold.ttf"),
"Kalam-Light": require("./assets/fonts/Kalam-Light.ttf"),
"Kalam-Regular": require("./assets/fonts/Kalam-Regular.ttf"),
});
const Stack = createStackNavigator();
const linking = {
config: {
screens: {
Home: "/",
StartGame: "/start",
WaitingForPlayers: "/waiting-for-players",
WaitingToStart: "waiting-to-start",
JoinGame: "/join",
Gameplay: "/play",
MarryAWord: "/marry-a-word",
PickAWinner: "/pick-a-word",
},
},
};
return (
<StoreProvider initialState={initialState} reducer={reducer}>
<NavigationContainer linking={linking}>
<Stack.Navigator>
<Stack.Screen
name="Home"
component={Home}
options={{ title: "Home", headerShown: false }}
/>
<Stack.Screen
name="StartGame"
component={StartGame}
options={{ title: "Start", headerShown: false }}
/>
<Stack.Screen
name="WaitingForPlayers"
component={WaitingForPlayers}
options={{ title: "WaitingForPlayers", headerShown: false }}
/>
<Stack.Screen
name="WaitingToStart"
component={WaitingToStart}
options={{ title: "WaitingToStart", headerShown: false }}
/>
<Stack.Screen
name="JoinGame"
component={JoinGame}
options={{ title: "Join", headerShown: false }}
/>
<Stack.Screen
name="Gameplay"
component={Gameplay}
options={{ title: "Gameplay", headerShown: false }}
/>
<Stack.Screen
name="MarryAWord"
component={MarryAWord}
options={{ title: "MarryAWord", headerShown: false }}
/>
<Stack.Screen
name="PickAWinner"
component={PickAWinner}
options={{ title: "PickAWinner", headerShown: false }}
/>
<Stack.Screen
name="Winner"
component={Winner}
options={{ title: "Winner", headerShown: false }}
/>
</Stack.Navigator>
</NavigationContainer>
</StoreProvider>
);
}
// Alpha test-1: NOTES
// Same word, join so that both players get the point (TWINSIES)
// make player name a different colour Waiting for PLAYER to start
// only show options once everyone has put something through
// Show the word when picking the proposed words
// Enable autocorrect on word input
// Pick 2 inners after 10 points
// sound
// End game screen