forked from PillarTechnology/CodeRace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTRUCTIONS.txt
101 lines (82 loc) · 3.97 KB
/
INSTRUCTIONS.txt
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
DEFINITIONS:
- RACE SERVER LAPTOP: The one laptop which receives race results from 5 COMPETITOR RACE LAPTOPS and displays them on the LEADER BOARD
- LEADER BOARD: The webpage, running on the RACE SERVER LAPTOP, that shows 5 lanes, each with a player's name and a graphic icon (car or whatever) and indicates each contestant's progress left-to-right in the lane.
- COMPETITOR RACE LAPTOP: The 5 laptops that the competitors sit at and write their code.
- RACE: One iteration of a selected kata, five players, their code and the results on the leaderboard.
RACE SERVER LAPTOP SETUP (Done by a Pillar person on RACE SERVER LAPTOP, once per RACE SERVER LAPTOP)
Pre-installations:
1. Git client (Only required for cloning git)
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
2. Node.js and NPM
https://docs.npmjs.com/getting-started/installing-node
Setup:
1. Clone CodeRace into local laptop:
type: ‘git clone https://github.com/PillarTechnology/CodeRace.git'
2. Determine IP of the laptop:
type: ‘cd CodeRace’
type: ‘ifconfig | grep 192’
You will see something like: inet 192.168.11.247
Write down the IP number starting with 192.
3. Install node packages
type: 'npm install'
Run:
1. Run server:
type: ‘npm start’
(You should see 'Race app listening at port 8081...holla at me' on the terminal')
2. Signup users:
Point browser to localhost:8081/signup
sign up person 1 (set the dropdown to 1)
sign up person 2 (set the dropdown to 2)
...
sign up person 5 (set the dropdown to 5)
3. Validate all users are signed up:
Display leaderboard by showing localhost:8081
COMPETITOR LAPTOP SETUP (Done by a Pillar person five times, once per COMPETITOR RACE LAPTOP)
Pre-installations:
1. Git client (Only required for cloning git)
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
2. Node.js and NPM
https://docs.npmjs.com/getting-started/installing-node
3. Gradle (If running race in Java)
https://docs.gradle.org/current/userguide/installation.html
Setup:
1. Clone CodeRaceClients into local laptop:
type: ‘git clone https://github.com/PillarTechnology/CodeRaceClients.git'
2. Setup race for each racer:
For JAVA:
// Replace RACER below with racer1, racer2, ... racer5, depending on which laptop
// Replace SERVER_IP with the server ip from above (192.168… number)
type: ‘./setupRace.sh romanNumeralsJava RACER SERVER_IP’
For Javascript:
type: 'cd RomanNumeralsJS'
type: 'npm install'
type: 'cd ..'
// Replace RACER below with racer1, racer2, ... racer5, depending on which laptop
// Replace SERVER_IP with the server ip from above (192.168… number)
type: ‘./setupRace.sh RomanNumeralsJS RACER SERVER_IP’
It should read 'Updated racer1 to 0' in the terminal.
3. Laptop is now setup for the race.
PLAYING IN THE RACE (Done by contestant, on their assigned COMPETITOR RACE LAPTOP)
Steps:
1. Open a new terminal window.
2. Edit the source file to make the tests pass:
For JAVA:
type: ‘cd CodeRaceClients/romanNumeralsJava/src/main/java/com/coderace/‘
edit the file RomanNumerals.java
For JAVASCRIPT:
type: ‘cd CodeRaceClients/RomanNumeralsJS/src’
edit the file RomanNumerals.js
3. Save file changes -> tests will be run and server leader board will be updated
RESET BACK CODE ON CLIENT LAPTOPS(Done by a Pillar person on COMPETITOR RACE)
Steps:
1. ./cleanup.sh
RESET ALL PLAYERS AND START NEW RACE (Done by a Pillar person on RACE SERVER LAPTOP)
SERVER LAPTOP to Reset all players and start new race (Pillar person)
Steps:
1. ctrl-c to stop the server
2. type: ‘./cleanup.sh'
3. type: ‘npm start’
4. Confirm that all lanes are 0% and have default driver names
5. sign up 5 new players
NOTE:
These katas seem to work: RomanNumeralsJS, FizzBuzzJS, romanNumeralsJava, fizzBuzzJava