jcr

  • 0 Posts
  • 122 Comments
Joined 2 years ago
cake
Cake day: December 5th, 2024

help-circle

  • Today, september 25th, in France it is 2.49 €/liter ; in some cities up to 2.89€. 1 in 2 gas station are not supplied and stop the pumps without warning. Rural economy is tanking, for people living on the countryside and commuting 20km a day it is close to unbearable. And it is not the end to it : an economy war is waged by the USA government to the rest of the world, most importantly Europe.



















  • I first built a dice roller : the core is just a call to random.randint module, but you need to have the terminal interface to get the instruction ( like “4d6” means you need to have 4 times random generation between 1 and 6). You can do it only with regexp, and if you want to get fancy you can try and find solutions to have compounded formulas, try to have the results stored during a game session, etc.

    Second project was a small game: the idea was to have a map of coordinates (xy), and each game has random spawning of 2 goblins and 3 gold within the map ; the goal is to move around (nswe) getting the 3 gold without hitting a goblin.

    So also no graphic representation of the map, you just have the game running at each keystroke.

    You just need to be able to define functions and do string manipulation ; for logic you can stay with if-then-else and while loop.

    And good luck with the learning !