6
votes
2answers
192 views

python: design of a simple game

I am trying to code Battleship. It should be a text one-player game against computer where computer and human player take turns in shooting at opponent's ships. I decided to start implementation with ...
1
vote
2answers
101 views

Database calls with Python Flask and SQLAlchemy

I am creating a Python Flask webservice and this is basically how I am doing all of my database calls if a webservice needs to interact with the database: @event.route("/somepath/<value>", ...
4
votes
1answer
155 views

I'd like a general review on this script that scrubs data from a csv file

Really, what I would like to know is: "What does this script tell you about how I need to improve as a programmer?" I'm somewhat new to both Python and programming, so feel free to minimize your ...
10
votes
2answers
429 views

Replacing Python Classes with Modules

I try to avoid using classes in Python as much as possible; if I don't plan on building on it, I don't build it in the first place. It helps me avoid Java-like classes like FileDownloader(), when I ...
5
votes
1answer
200 views

Improve class design

I am writing a wrapper around the GeUserArea class of Cinema 4D's Python API to enable creating user interfaces using an object orientated interface. I've already written 2 prototypes, but I am not ...
3
votes
1answer
257 views

What would be a clean interface for this?

I'd like some suggestions regarding how to implement the programmer/scripter interface for building entities in my game. I know what the interaction should be, and what the classes are going to be. I ...