2022-12-04 20:53:01 +01:00
2022-12-04 20:53:01 +01:00
2022-12-04 20:53:01 +01:00
2022-12-04 20:53:01 +01:00

Advent of Code 2022 - assignment2 javascript

Description

Assignment2 involves a game of rock paper scissors. The solution uses an enum for rock, paper, scissor values it defines two functions for selecting a winning and losing hand. The winning and losing hand take advantage of the fact that each next value in the rock, paper, scissor trio beats the previous (looping back to rock). For losing it is the other way around. The winning_hand function is also used to determine the score for player. In the GUI there is a checkbox for selecting solution options (part1,part2).

References

Description
Advent of Code assignments
Readme 358 KiB
Languages
JavaScript 52.2%
HTML 26.4%
CSS 21.4%