Relative Content

Tag Archive for pythongame-development

Why can’t I implement this equation to my game?

SoI’m trying to code a game that renders in the terminal. It is a grid-based system, which uses list[int, int] (vector) for positions, directions etc. my map is a 5×5 and I’m basically trying to implement an equation I’ve come up with so that the player won’t be able to move beyond the borders. For example, if the player prompts to move 7 (6, 0) positions to the right from the starting position (0, 0), the player shall not move that far, but will move at least 5 positions to reach the border (4, 0).

Python help for a beginner

I’m new to coding in terms of experience in general but I am wanting to create a small game in Python.