Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
33
Task/24-game/MIRC-Scripting-Language/24-game.mirc
Normal file
33
Task/24-game/MIRC-Scripting-Language/24-game.mirc
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
alias 24 {
|
||||
dialog -m 24-Game 24-Game
|
||||
}
|
||||
|
||||
dialog 24-Game {
|
||||
title "24-Game"
|
||||
size -1 -1 100 70
|
||||
option dbu
|
||||
text "", 1, 29 7 42 8
|
||||
text "Equation", 2, 20 21 21 8
|
||||
edit "", 3, 45 20 40 10
|
||||
text "Status", 4, 10 34 80 8, center
|
||||
button "Calculate", 5, 5 45 40 20
|
||||
button "New", 6, 57 47 35 15
|
||||
}
|
||||
|
||||
on *:DIALOG:24-Game:init:*: {
|
||||
did -o 24-Game 1 1 Numbers: $rand(1,9) $rand(1,9) $rand(1,9) $rand(1,9)
|
||||
}
|
||||
|
||||
on *:DIALOG:24-Game:sclick:*: {
|
||||
if ($did == 5) {
|
||||
if ($regex($did(3),/^[ (]*\d *[-+*/][ (]*\d[ ()]*[-+*/][ ()]*\d[ )]*[-+*/] *\d[ )]*$/)) && ($sorttok($regsubex($did(3),/[^\d]+/g,$chr(32)),32) == $sorttok($remove($did(1),Numbers:),32)) {
|
||||
did -o 24-Game 4 1 $iif($calc($did(3)) == 24,Correct,Wrong)
|
||||
}
|
||||
else {
|
||||
did -o 24-Game 4 1 Wrong Numbers or Syntax
|
||||
}
|
||||
}
|
||||
elseif ($did == 6) {
|
||||
did -o 24-Game 1 1 Numbers: $rand(1,9) $rand(1,9) $rand(1,9) $rand(1,9)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue