Start Day 02
This commit is contained in:
@@ -37,6 +37,15 @@ determine_score :: proc(friendly: Move, enemy: Move) -> int {
|
|||||||
return result + int(friendly)
|
return result + int(friendly)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
determine_score_alt :: proc(friendly: Move, outcome: Move) -> int {
|
||||||
|
// X = lose round
|
||||||
|
// Y = draw round
|
||||||
|
// Z = win round
|
||||||
|
// 3 defeats 2, 2 defeats 1, 1 defeats 3
|
||||||
|
// If w := enemy input and v := friendly input, then w = (v - 1) % 2 is a defeat
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
main :: proc () {
|
main :: proc () {
|
||||||
init()
|
init()
|
||||||
if len(os.args) < 2 {
|
if len(os.args) < 2 {
|
||||||
@@ -92,4 +101,4 @@ main :: proc () {
|
|||||||
}
|
}
|
||||||
delete(rune_move);
|
delete(rune_move);
|
||||||
fmt.printf("Your score is: %d\n", total_score)
|
fmt.printf("Your score is: %d\n", total_score)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user