Having trouble with a game im trying to work on

Started by
3 comments, last by EdinsonC 9 years, 11 months ago

The game is scripted in python 3 and isn't much of a game yet but i've already ran into some trouble.

It is most probably something very simple, but i can't seem to wrap my head around it.

Here's the source code: http://www.mediafire.com/view/bzkw3hkncufnb7o/Catch.py

Now i'll tell you what the source code is supposed to do and what it doesn't:

The code is supposed to store "boards" for different levels in a list so that i can later fetch those boards when needed.

The fist function defined if "fetchNewBoard" which i would call whenever the levels change.

This function is supposed to check what level the player is up to and depending on that give the according "board" and stats (such as the edges of the board and stuff because some boards will be bigger.)

Then the "board" is returned as the "gameBoard" which is printed to the screen in the "showBoard" function.

It seems the code works fine, it prints the board to the screen (but not the players), however the players are given a random role and all, but i messed around a bit (bad idea) and i messed it up even more, now when i give input to move a player the game changes their roles LOL.

The problem is definitely above line 78 and i think the main problem i'm having is the board not updating right. Before attempting to implement this idea of the "fetchNewLevel" function i had the game playing smoothly with everything working as it was supposed to. But back then i had the board printed in the "showBoad" function; like the string of the board was in the print() and not a variable. I'm guessing it's becase the variable is storing the board it got but the board inside the variable isn't being updated when the "cells" are changed (when the player changes position). However, i figured i'd get someone to help me and explain what i'm doing wrong before i mess the code up more LOL.

Thanks

Advertisement
MediaFire tries to tell me my browser is old and I should “upgrade” to the one of their choice—a scare tactic I morally appose—and I will not view the file there.

Why don’t you just post the code here if it is not too long? If it is definitely above line 78, why not post the first 78 lines?


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

There's also pastebin and pasteofcode

MediaFire tries to tell me my browser is old and I should “upgrade” to the one of their choice—a scare tactic I morally appose—and I will not view the file there.

Why don’t you just post the code here if it is not too long? If it is definitely above line 78, why not post the first 78 lines?


L. Spiro

You don't use adblock do you?

Anyway, I agree with posting it on pastebin.

I figured put my problem ^_^

This topic is closed to new replies.

Advertisement