-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
140 lines (132 loc) · 5.88 KB
/
Makefile
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
CXX := g++
CXX_FLAGS := -Wall -std=c++14
BIN := bin
SRC := src
INCLUDE := include
LIBRARIES :=
EXECUTABLE := main
all: $(BIN)/$(EXECUTABLE)
run: clean all
clear
./$(BIN)/$(EXECUTABLE)
$(BIN)/$(EXECUTABLE): $(SRC)/*.cpp
$(CXX) $(CXX_FLAGS) -I$(INCLUDE) $^ -O -o $@ $(LIBRARIES)
clean:
-rm $(BIN)/*
tests: clean all test-IF test-TP test-UI test-ERS test-EGS test-RB1 test-LS1 test-TS1 test-FR1 test-FG1
test-IF: test-IF1 test-IF2 test-IF3 test-IF4 test-IF5 test-IF6 test-IF7
test-TP: test-TP1 test-TP2 test-TP3 test-TP4 test-TP5 test-TP6 test-TP7 test-TP8 test-TP9
test-UI: test-UI1 test-UI2 test-UI3 test-UI4 test-UI5 test-UI6
test-ERS: test-ERS1 test-ERS2 test-ERS3 test-ERS4 test-ERS5 test-ERS6 test-ERS7
test-EGS: test-EGS1 test-EGS2 test-EGS3
test-IF1:
@printf "\nTest the game fails to load when the a factory is invalid (missing).\n"
@./run_test.sh $(BIN) $(EXECUTABLE) IF1 output
test-IF2:
@printf "\nTest the game fails to load when the players mosaic board is invalid (missing).\n"
@./run_test.sh $(BIN) $(EXECUTABLE) IF2 output
test-IF3:
@printf "\nTest the game fails to load when the players broken tiles row is invalid (missing).\n"
@./run_test.sh $(BIN) $(EXECUTABLE) IF3 output
test-IF4:
@printf "\nTest the game fails to load when a factory has too many tiles.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) IF4 output
test-IF5:
@printf "\nTest the game fails to load when a players broken tiles row has too many tiles.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) IF5 output
test-IF6:
@printf "\nTest the game fails to load when a players storage has too many tiles.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) IF6 output
test-IF7:
@printf "\nTest the game fails to load when a players mosaic has too many tiles.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) IF7 output
test-TP1:
@printf "\nTest tile placement from factory 1 to empty storage row.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) TP1
test-TP2:
@printf "\nTest tile placement from factory 5 to empty storage row 5.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) TP2
test-TP3:
@printf "\nTest tile placement from factory 2 to empty storage row. 2.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) TP3
test-TP4:
@printf "\nTest tile placement from factory to 'broken'.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) TP4
test-TP5:
@printf "\nTest tile cannot be placed on a full storage row.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) TP5
test-TP6:
@printf "\nTest tile cannot be placed on a storage row already containing a different colour.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) TP6
test-TP7:
@printf "\nTest tile cannot be placed on a storage row where corresponding mosaic row has already completed tile of the same colour.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) TP7
test-TP8:
@printf "\nTest that when the broken row is full (has 7 Tiles in it) any more tiles are added to the box lid instead.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) TP8
test-TP9:
@printf "\nTest that when the broken row is full (has 7 Tiles in it) any more tiles are added to the box lid instead.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) TP9
test-UI1:
@printf "\nTest the game handles out of range factory index input.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) UI1
test-UI2:
@printf "\nTest the game handles char as factory index input.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) UI2
test-UI3:
@printf "\nTest the game handles out of range storage index input.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) UI3
test-UI4:
@printf "\nTest the game handles string as storage index input.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) UI4
test-UI5:
@printf "\nTest the game handles non existent tile reference.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) UI5
test-UI6:
@printf "\nTest the game handles multi character tile reference string.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) UI6
test-ERS1:
@printf "\nTest the players score increases by 1 when 1 tile is placed at the end of a round.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) ERS1
test-ERS2:
@printf "\nTest a players score increases by 3 when 1 tile is placed adjacent to two others horizontally at the end of a round.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) ERS2
test-ERS3:
@printf "\nTest a players score increases by 6 when 1 tile is placed adjacent to 2 tiles horizontally and 2 tiles vertically at the end of a round.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) ERS3
test-ERS4:
@printf "\nTest a players score decreases 1 per tile for the first two spaces on the broken row.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) ERS4
test-ERS5:
@printf "\nTest a players score decreases 1 per tile for the first two spaces on the broken row & 2 per tile for the next 3 spaces on the broken row.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) ERS5
test-ERS6:
@printf "\nTest a players score decreases 1 per tile for the first two spaces on the broken row & 2 per tile for the next 3 spaces on the broken row & 3 per tile for the next 2 spaces on the broken row.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) ERS6
test-ERS7:
@printf "\nTest a players score ddoes not go below zero when they lose more points than they have.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) ERS7
test-EGS1:
@printf "\nTest the end of game horizontal row scoring\n"
@./run_test.sh $(BIN) $(EXECUTABLE) EGS1 output
test-EGS2:
@printf "\nTest the end of game vertical column scoring\n"
@./run_test.sh $(BIN) $(EXECUTABLE) EGS2 output
test-EGS3:
@printf "\nTest the end of game all tiles of same colour completed scoring\n"
@./run_test.sh $(BIN) $(EXECUTABLE) EGS3 output
test-RB1:
@printf "\nTest the bag refills correctly when it runs empty.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) RB1
test-LS1:
@printf "\nTest the game loads and saves correctly.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) LS1
test-TS1:
@printf "\nTest the factories sort tiles into total order.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) TS1
test-FR1:
@printf "\nTest 1 round is playable.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) FR1
test-FG1:
@printf "\nTest full game is playable.\n"
@./run_test.sh $(BIN) $(EXECUTABLE) FG1