2048: Difference between revisions

Content added Content deleted
(→‎{{header|REXX}}: updated the OUTPUT section.)
m (→‎{{header|REXX}}: updated the OUTPUT section to demonstrate more capabilities.)
Line 4,571: Line 4,571:
end /*r*/; return</lang>
end /*r*/; return</lang>
{{out|output|text=&nbsp; when using the default inputs:}}
{{out|output|text=&nbsp; when using the default inputs:}}
<pre style="font-size:85%;height:95ex">
<pre>
╔══════╦══════╦══════╦══════╗
╔══════╦══════╦══════╦══════╗
║ ║ ║ ║ ║
║ ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
║ 2 ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
╠══════╬══════╬══════╬══════╣
║ ║ ║ ║ ║
║ ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
╠══════╬══════╬══════╬══════╣
║ ║ ║ ║ ║
╚══════╩══════╩══════╩══════╝

──────── Please enter a direction (Up, Down, Right, Left) ───or─── Quit:
right

╔══════╦══════╦══════╦══════╗
║ ║ ║ ║ ║
║ ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
╠══════╬══════╬══════╬══════╣
2 ║ ║ ║
║ ║ ║ 2
╠══════╬══════╬══════╬══════╣
║ ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
║ ║ ║ ║ 2 ║
╚══════╩══════╩══════╩══════╝
╚══════╩══════╩══════╩══════╝


──────── Please enter a direction (Up, Down, Right, Left) ───or─── Quit:
──────── Please enter a direction (Up, Down, Right, Left) ───or─── Quit:
up
righ


╔══════╦══════╦══════╦══════╗
╔══════╦══════╦══════╦══════╗
2 ║ ║ ║
║ ║ ║ 4
╠══════╬══════╬══════╬══════╣
║ ║ ║ ║ 2 ║
╠══════╬══════╬══════╬══════╣
╠══════╬══════╬══════╬══════╣
║ ║ ║ ║ ║
║ ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
╠══════╬══════╬══════╬══════╣
║ ║ ║ ║ ║
║ ║ ║ ║ ║
╚══════╩══════╩══════╩══════╝

──────── Please enter a direction (Up, Down, Right, Left) ───or─── Quit:

──────────────────────────────────────── moves: 2 ──────── score: 4

╔══════╦══════╦══════╦══════╗
║ ║ ║ ║ 4 ║
╠══════╬══════╬══════╬══════╣
╠══════╬══════╬══════╬══════╣
║ ║ ║ ║ 2 ║
║ ║ ║ ║ 2 ║
╠══════╬══════╬══════╬══════╣
║ ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
║ ║ ║ ║ ║
╚══════╩══════╩══════╩══════╝
╚══════╩══════╩══════╩══════╝


──────── Please enter a direction (Up, Down, Right, Left) ───or─── Quit:
──────── Please enter a direction (Up, Down, Right, Left) ───or─── Quit:
left
le


╔══════╦══════╦══════╦══════╗
╔══════╦══════╦══════╦══════╗
║ 4 ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
║ 2 ║ ║ ║ ║
║ 2 ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
╠══════╬══════╬══════╬══════╣
║ ║ 2 ║ ║ ║
║ ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
║ ║ ║ ║ 2 ║
╚══════╩══════╩══════╩══════╝

──────── Please enter a direction (Up, Down, Right, Left) ───or─── Quit:
l

╔══════╦══════╦══════╦══════╗
║ 4 ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
║ 2 ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
╠══════╬══════╬══════╬══════╣
║ ║ ║ ║ ║
║ ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
╠══════╬══════╬══════╬══════╣
║ 2 ║ 4 ║ ║ ║
╚══════╩══════╩══════╩══════╝

──────── Please enter a direction (Up, Down, Right, Left) ───or─── Quit:
dow

╔══════╦══════╦══════╦══════╗
║ ║ ║ ║ 2 ║
╠══════╬══════╬══════╬══════╣
║ ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
║ 4 ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
║ 4 ║ 4 ║ ║ ║
╚══════╩══════╩══════╩══════╝

──────── Please enter a direction (Up, Down, Right, Left) ───or─── Quit:
left

╔══════╦══════╦══════╦══════╗
║ 2 ║ ║ ║ ║
║ 2 ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
║ ║ ║ ║ 2 ║
╠══════╬══════╬══════╬══════╣
║ 4 ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
║ 8 ║ ║ ║ ║
╚══════╩══════╩══════╩══════╝
╚══════╩══════╩══════╩══════╝


──────── Please enter a direction (Up, Down, Right, Left) ───or─── Quit:
──────── Please enter a direction (Up, Down, Right, Left) ───or─── Quit:
lef
le


╔══════╦══════╦══════╦══════╗
╔══════╦══════╦══════╦══════╗
║ 2 ║ ║ ║ ║
║ 2 ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
╠══════╬══════╬══════╬══════╣
║ 2 ║ 2 ║ ║
║ 2 ║ ║ ║ 2
╠══════╬══════╬══════╬══════╣
╠══════╬══════╬══════╬══════╣
║ 4 ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
║ 8 ║ ║ ║ ║
╚══════╩══════╩══════╩══════╝

──────── Please enter a direction (Up, Down, Right, Left) ───or─── Quit:
d

╔══════╦══════╦══════╦══════╗
║ ║ ║ ║ ║
║ ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
╠══════╬══════╬══════╬══════╣
2 ║ ║ ║ ║
4 ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
║ 4 ║ ║ ║ 2 ║
╠══════╬══════╬══════╬══════╣
║ 8 ║ ║ ║ 2 ║
╚══════╩══════╩══════╩══════╝
╚══════╩══════╩══════╩══════╝


Line 4,629: Line 4,708:
║ ║ 2 ║ ║ ║
║ ║ 2 ║ ║ ║
╠══════╬══════╬══════╬══════╣
╠══════╬══════╬══════╬══════╣
2 ║ ║ ║ ║
8 ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
║ 8 ║ ║ ║ 4 ║
╚══════╩══════╩══════╩══════╝

──────── Please enter a direction (Up, Down, Right, Left) ───or─── Quit:

──────────────────────────────────────── moves: 9 ──────── score: 32

╔══════╦══════╦══════╦══════╗
║ ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
║ ║ 2 ║ ║ ║
╠══════╬══════╬══════╬══════╣
║ 8 ║ ║ ║ ║
╠══════╬══════╬══════╬══════╣
╠══════╬══════╬══════╬══════╣
42 ║ ║
8 ║ ║ 4
╚══════╩══════╩══════╩══════╝
╚══════╩══════╩══════╩══════╝