Jump to content
  • entries
    732
  • comments
    1562
  • views
    494296

Neat assignments

Sign in to follow this  
Ravuya

119 views

My Java prof handed us an assignment.

Pretty much, you have to code a parser and implement opcodes for a Corewars-style robot battle simulator.

Here are two screenshots, since I'm sure everyone would like to know (even though I didn't build the front-end or graphics).




Here is the source from the last robot:
; robot1.rob
start: mov #1, turn
mov #1, pen
mov #255, penColourRed
mov #300, penColourGreen
mov #100, penColourBlue
mov #5, penWidth
mov #90, thrust
loop: mov #1, turn
mov #100, thrust
bra loop
Sign in to follow this  


3 Comments


Recommended Comments

Yeah, you can have two types of robots -- combat (they hit each other with hammers) or drawing (they doodle with a pen).

Interestingly, this is not actually mutually exclusive; the client allows robots to both draw pretty pictures and kick ass.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!