2048: Difference between revisions

42 bytes added ,  1 month ago
m
→‎{{header|FutureBasic}}: Remove FutureBasic 'Output' label
(Cleaned up task description to make it more succinct, more accurate, and clearer. Also cleaned up html.)
m (→‎{{header|FutureBasic}}: Remove FutureBasic 'Output' label)
 
(5 intermediate revisions by 3 users not shown)
Line 8,169:
void local fn drawBoard
int x, y,r = 1, add
cls
for y = 320 to 20 step -100
for x = 20 to 320 step 100
Line 8,247 ⟶ 8,248:
next
fn drawBoard
if moved == 0 then exit fn
Line 8,257 ⟶ 8,259:
if rnd(10) - 1 then bd[b]++ else bd[b] = 2
zs--
timerbegin 0.25
fn drawBoard
fn drawBoard
timerend
if zs then exit fn
Line 8,296 ⟶ 8,300:
handleevents
</syntaxhighlight>
[[File:FutureBasic 2048 Game Window.png]]
{{out}}
[[File:2048 Game Window.png]]
 
=={{header|Go}}==
Line 16,699 ⟶ 16,702:
{{libheader|Wren-fmt}}
{{libheader|Wren-str}}
<syntaxhighlight lang="ecmascriptwren">import "./dynamic" for Enum, Struct
import "random" for Random
import "./ioutil" for Input
import "./fmt" for Fmt
import "./str" for Str
 
var MoveDirection = Enum.create("MoveDirection", ["up", "down", "left", "right"])
416

edits