You recalibrate your cannon.\n<<button [[opponent's turn]]>>
<<set $target to either("hit","miss")>>\s\nYou fire!\nYour attack is a <<print $target>>!\n<<if $target is "hit">><<button [[opponent's turn]]>>\n<<else>>\n<<if $target is "miss">><<button [[recalibrate]]>>\n<<endif>>\n<<endif>>\n<<if $target is "hit">><<set $oparmour = $oparmour - $firepower>>Opponent cannon armour: <<print $oparmour>>\n<<else>>\n<<if $target is "miss">>Opponent cannon armour: <<print $oparmour>> \n<<endif>>\n<<endif>>
<<set $target to either("hit","miss")>>\s\n <<if $oparmour >0>>\nYour attack is a <<print $target>>!\n<<if $target is "hit">><<button [[opponent's turn]]>>\n<<else>>\n<<if $target is "miss">><<button [[recalibrate]]>>\n<<endif>>\n<<endif>>\n<<if $target is "hit">><<set $oparmour = $oparmour - $firepower>>Opponent cannon armour:<<print $oparmour>>\n<<else>>\n<<if $target is "miss">>Opponent cannon armour:<<print $oparmour>> \n<<endif>>\n<<endif>>\n <<else>>\n <<if $oparmour < 30>><<button [[You won]]>>\n <<endif>>\n <<endif>>
<<set $target to either("hit","miss")>>\s\n <<if $armour >0>>Your opponent fires!\nThe attack was a <<print $target>>!\n<<if $target is "hit">><<set $armour = $armour - $firepower>>\n<<endif>>Your cannon armour: <<print $armour>>\n<<button [[fire]]>>\n <<else>>\n <<if $armour < 30>><<button [[You lost]]>>\n <<endif>>\n <<endif>>
Congratulations! You opponent is defeated!
Welcome to a turn-based cannon battle.\n\nYou have at your command an energy canon.\n Armour: 120\nFirepower: 30\n\nYour opponent has one as well.\n Armour: 120\nfirepower: 30\n\nBetween you and your opponent there are prevailing winds that may affect your targeting.\n\nClick the button to see who goes first:\n<<button [[GO]]>>\n\n<<set $target to either("hit","miss")>>\n<<set $armour = 120>>\n<<set $oparmour = 120>>\n<<set $firepower = 30>>\n\n
The Cannon
<<set $number to either(1,2)>>\n<<if $number eq 1>><<button [[your turn]]>>\n<<else>>\n<<if $number eq 2>><<button [[opponent's turn]]>>\n<<endif>>\n<<endif>>\n
Jurgen Botha
Your opponent has defeated you and your cannon is destroyed.