πΈπβοΈπ¦πA ruby DSL parser based on rock paper scissors lizard spock, written in a Domain Specific language.
https://www.youtube.com/watch?v=iSHPVCBsnLw
The usage is as follows.
- A + B Returns the winner.
- A - B Returns the loser.
show Spock - (Lizard + Paper)
Returns
Lizard eats Paper (winner Lizard)
Lizard poisons Spock (loser Spock)
Result = Spock
Scissors cuts paper, paper covers rock, rock crushes lizard, lizard poisons Spock, Spock smashes scissors, scissors decapitates lizard, lizard eats paper, paper disproves Spock, Spock vaporizes rock, and as it always has, rock crushes scissors."
- Sheldon Cooper (The Big Bang Theory.)
We are opening our first Cooper Spock Parser created by Daniel Sada & Jose Manuel Castilla, This is our parser for solving multiple chains of a complex Rock Paper Scissors Lizard Spock. It can solve complex Rock Paper Scissors Lizard Spock chains.
According to Wikipedia
A domain-specific language (DSL) is a computer language specialized to a particular application domain. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains.
The usage is as follows.
- A + B Returns the winner.
- A - B Returns the loser.
show Spock - (Lizard + Paper)
Returns
Lizard eats Paper (winner Lizard)
Lizard poisons Spock (loser Spock)
Result = Spock
To test the program, inside the main folder type the following instruction at the command line:
ruby -I -w jakenpon_test.rb
-
M. Fowler. UML Distilled: A Brief Guide to the Standard Object Modeling Language, 3rd Edition. Addison-Wesley, 2003.
-
E. Gamma, R. Helm, R. Johnson, J. M. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1994.
-
\R. Olsen. Design Patterns in Ruby. Addison-Wesley, 2007.
This documentation was developed as part of a programming activity for the Software Design and Architecture course (Tc3049), at the TecnolΓ³gico de Monterrey, Campus Estado de MΓ©xico. Please visit our teacher's website. It is pretty great. arielortiz.info