Online demonstrations #
You can see the Atlas toolkit in action by clicking one of the following preview pictures and then the Run button. The application is directly executed by the browser, so it may take some time to be displayed.
Use the buttons at the bottom of the application to share the currently running application. You may also long-press/right-click the QR code displayed by the first button.
Sharing an application lets you interact with - and with other users, if the application is designed to do so - from any device with a modern web browser connected to internet.
On first launch, the source code and/or the application may take some time to be displayed (perhaps more than 10 seconds), but subsequent launches will be much faster.
Hello, World! (Hello
)
#
Hello, World! program showing the basics of an application using the Atlas toolkit. The application simply displays a message showing the contents of a text field.
Hello, World! shared (Hellos
)
#
Same application as above, but messages are displayed to all users. Shows the basics of an application that allows users to interact.
Messages (Messages
)
#
This application allows messages to be exchanged between all devices connected to the same application.
Widgets (Widgets
)
#
This application shows an example of use of commonly used graphical interface components (widgets) and the corresponding source code (HTML and Python).
Connect Four (FourInARow
)
#
The Connect Four game for two players. Use the sharing buttons described at the top of this page for the other player to access the game on its device.
Mancala (Mancala
)
#
The ancient two-player, seed-sowing game.
Grab the seeds from a pit on your side and place one in each following pit, going counterclockwise and skipping your opponent’s store. If your last seed lands in an empty pit of yours, move the opposite pit’s seeds into your store. The goal is to get the most seeds in your store on the side of the board. If the last placed seed is in your store, you get a free turn.
Flood it! (Flooder
)
#
Set the upper left color/shape, which fills in all the adjacent squares of that color/shape, by selecting a square with the desired color/shape. Try to make the entire board the same color/shape.
Pig game (PigGame
)
#
A two-player version of the Pig game. By default, the opponent is the computer. By selectig human vs human and the clicking on New game, a QR code is displayed allowing another player to play with you using its own device.
Notes #
This online demonstrations are based on a slightly modified version of the Python version of the Atlas toolkit so it can be executed by web browsers. All the methods of the first parameter (usually named dom) of the callbacks given to the launch(…) function are coroutines so they have to be called with await, hence if a function calls one of this method it has to be prefixed with async (async def …
).
Take attention that expressions like:
name = await dom.getValue("Name").strip()
are wrong as the await is applied to the result of the strip function, and have to be write this way:
name = (await dom.getValue("Name")).strip()
so the strip() function is applied to the result of the call of the getValue(…) coroutine after being completed.
In above applications, the content of the HEAD
constant is put in the head section of the HTML page displayed by the application, and the content of the BODY
constant is put in the body section.