Time to update the beautiful text on the terminal
In my previous post, I changed the core API to handle Ada’s Seperate Ways playthrough. Here we’ll be updating the CLI to handle the new API functionality. I want to add an option where the user can hit l
or a
to start either playthrough. Let’s make some changes
While I write this code…wait, where’s my while?!
Currently, I’m using a for loop to scan user input and use the API. The only way of getting out is by hitting q
or ctrl+c
. Now I’ll add another loop scanning for input on the start game conditions, wether it will be Ada or Leon. The funny thing I encountered here is that the switch automatically breaks but only out of the switch, it won’t get out of the for loop. I’m using a ready
boolean to say when it’s ready to break free of the for loop. Why did Google not add while
to Golang? Cause for
is there!