[GoLang]A simple game – Rock Paper Scissors Lizard Spock

Last week, I just noticed that in this semester(2013 Fall), the Intro C Language(IPC144) course’s assignment 1 is a game called Rock Paper Scissors Lizard Spock. The first I encountered this game was when I was learning Python language on a online course. Unfortunately, I quit that course coz I was way too busy, but the game concept was embed into my mind.

Since it has been a long time that I have not actually  on my normal study pace due to the “DEATH” of my deeply loved 4-year-old laptop. Now thanks to my dear sister like friend, I got a temporary laptop and am able to be back on the track of studying Go Language.

Today I am going to make a “Rock Paper Scissors Lizard Spock” game using Go Language. I have seen many people use tons of if statements to judge the result of two players. The judgement part is indeed the tricky programming part of this game, and I am going to think of a clear way to implement it. Finally that part results into four lines of code. I cannot be 100 percent sure that it it right, but anyway hopefully there would be no bug.

My code would be available publicly on GitHub. Please feel free to fork and improve.

In addition, absolutely, I will finish the bonus part of that game which is Human versus Artificial Intelligence. It would be coming soon.

GitHub Repo(The folder is called RPSLS): https://github.com/Parthas-Menethil/GoLangStudy

Parthas.Menethil (Luke.J.Sun)

Leave a Reply

Your email address will not be published. Required fields are marked *