Reference

ansi

ANSI helper functions.

ansi.clear_line(line)[source]

Clear line.

ansi.clear_screen()[source]

Clear screen.

ansi.print_at(line, col, text)[source]

Print at line and column. Requires colorama.

ansi.set_print_pos(line, col)[source]

Define priting position. Requires colorama.

boatman

A simple logic game. A boatman is comissioned to take a Wolf, a Goat and some Pasture to the other margin. He can only take one at the time. While he is on the dock, nothing happens. As soon as he leaves, the animals will try to eat. The order of transportation is important because the Wolf eats the Goat and the Goat eats the Pasture, but the Wolf doesn’t eat the Pasture.

Portuguese

Um jogo de lógica simples. Um barqueiro é contratado para levar um Lobo, uma Cabra e Pasto para a outra margem. Só pode levar um de cada vez. Enquanto está na doca nada acontece. Assim que saí, os animais tentam comer. A ordem de transporte é importante porque o Lobo come a Cabra e a Cabra come o Pasto, mas o Lobo não come o Pasto.

boatman.fireworks()[source]

Print fireworks.

boatman.main()[source]

Clear screen, draw scenario, request input and select correct action.

boatman.move_boat(to_pos)[source]

Move boat to right/left dock, and returns position after move.

boatman.move_left(item, boat_pos, left_items, right_items)[source]

Move item to left dock.

boatman.move_right(item, boat_pos, left_items, right_items)[source]

Move item to right dock.

boatman.upd_status(cur_boat_pos, left_items, right_items)[source]

Update game status, showing a message and if won some fireworks.

localization

Localization.

localization.sys_lang()[source]

Get system language.

utils

Utilities.

utils.run(win_cmd=u'', x_cmd=u'')[source]

Run OS command.