Another pen and paper game primarily for the classroom. Press space to begin the game. The color whose turn is first is randomly selected, but the turn can be shifted to the other color anytime by pressing and holding the space key. If the space key and the down arrow key are held together, the entire board will be reset. Highlight a line by hovering over it and lock it in by clicking. If an already colored line is clicked and the mouse button is held down, the line is erased and the turn is reset (in the event of a mistake for example). A side wins by forcing the other side to draw a triangle completely composed of that other side's color; there is no win-detection for this state.
I'll have to come up with a way to detect the win state, but for now the main features I wanted to code work so that will be put on the back burner. Also, there's definitely a few routes for optimization, particularly by utilizing cloning or drawing instead of having each line as its own sprite with duplicate scripts. I was thinking of another way to select the line that might make the game overall more visually appealing: namely to select two points and have the line between the two selected points appear. The main issue I have with the current set up is that hovering over the intersection points of the lines show all lines that cross that point. Luckily there's no way to exploit this that breaks the game because if clicked, only the topmost line is drawn in.