3
votes
2answers
61 views

Connect 4 game for AI agents

This Connect 4 game will be used for implementing game-playing AI. Sample players are supplied. One takes user input, and the other plays randomly. Right now it's set for a human player to play ...
5
votes
1answer
43 views

First text game with Python - Higher or Lower

Recently I have been learning Python programming, for about a week. I have covered all basic stuff - loops, strings, input masks - and have challenged myself by making a little game. It isn't much, ...
5
votes
1answer
116 views

Small text adventure

I made this small text adventure just to see what I could do with Python, and I'm basically wondering how it could be optimized. EDIT: I changed a few things, hopefully it makes a bit more sense now ...
2
votes
2answers
91 views

Simple Card Game in Python

After finishing up finals, I wasn't really working on coding for a while. I decided to write a card game to get back into the programming scene. I'm just wondering if there's anything that I missed ...
1
vote
3answers
77 views

How could I make my simple Python maze game better?

The program is running fine but I was just wondering whether there was anything I could do to make it more user friendly or efficient. Please note that I have only been programming for a couple of ...
4
votes
3answers
121 views

Second try at a Python game

I've posted this some time ago. Here is the new version that I made based on all the comments that were made. Another look and TIPs would be much appreciated, especially on: Getting rid of the ...
7
votes
3answers
3k views

Character creator for a role-playing game

Goal: Write a character creator program for a role-playing game. The player should be given a pool of 30 points to spend on four attributes: strength, health, wisdom, and dexterity. The ...
6
votes
1answer
252 views

Can my Python maze game be better in any way?

How could I improve or make this program more user friendly? I have not been programming very long, so please don't give me a task that is too complicated. ...
1
vote
2answers
89 views

How to make this random number game better?

I'm a newbie trying to teach myself Python. Could somebody tell me if there is a better way to write this? I am also curious as to whether or not there is anything I should not do. This code does ...
4
votes
5answers
181 views

Guessing words from scrambled letters

How could I possibly shorten / clean this up? I suppose mainly clean up the loop at the start asking whether they would like to scramble the code. ...
13
votes
2answers
253 views

First try at a Python game

I've started coding about 3 weeks ago, just for fun and maybe practical uses later. My GF dared me to make a PGM that would replace this dice game where you roll two dice, one with body parts and one ...
4
votes
0answers
117 views

Tetris clone written in Python/Pygame

I have a medium-sized project here, and I would like some comments on the code. In particular I'd like comments on how well I'm handling OO-programming, my programs logic and whether you think my code ...
5
votes
1answer
142 views

Python Adventure game

I'm a beginner Python coder and this is the first program that I have ever programmed. Please suggest improvements/bugs. Here's the link to the code. ...
7
votes
1answer
2k views

Unbeatable Tic-Tac-Toe program seems difficult to read

I've made an unbeatable Tic-Tac-Toe in Python 3.3. While it truly was unbeatable, it was an eyesore to look at and nigh impossible to read. That code is here. I have since then optimized it for ...
6
votes
5answers
198 views

Guessing Game in Python

Now that I've got this working, any improvements that I can make to better my code review would be helpful. ...
7
votes
4answers
2k views

Plague Inc. in Python - Extremely Early Stage

I've been working to create a game in Python similar to Plague Inc. and instead of just writing one big clump of code and then getting it reviewed, I wanted to do it stage-by-stage and make it a ...
1
vote
1answer
533 views

Craps dice game simulator

This craps game simulator is based on some one else's posted Python code that I've redone for practice. I'm interested in improving readability and making it more pythonic. I used unittest instead of ...
3
votes
2answers
672 views

Hangman in Python

I created this version of Hangman in Python 3. Does anyone have any tips for optimization or improvement? ...
9
votes
1answer
2k views

Command-line noughts and crosses

I've just got a Raspberry Pi, so I thought I'd try my hand at some Python. This is my first ever Python program (hurrah!). It's a very simple command-line implementation of noughts and crosses. The ...
9
votes
1answer
149 views

Mafia game simulation engine

I've written a program to simulate a game of Mafia among several bots. Here's the directory structure the program lives in (to make understanding parts of the program easier): ...
10
votes
2answers
723 views

Sudoku solver using simple deductions and brute-force guessing

Here's my attempt at Weekend Challenge #3. Key characteristics of this Python entry are: The strategy is to alternate between "auto-complete" (making simple deductions such as naked singles and ...
4
votes
2answers
277 views

Character generator

I'm a total newbie teaching myself via Zed Shaw's Learn Python The Hard Way and I've gotten bored over a week long memorization lesson, so I thought I would make a character generator for a pen and ...
7
votes
3answers
254 views

2-player in a Python hangman game

This is a follow-up: Python Hangman Program I'm working on adding a few features to my hangman game, and I just implemented two-player gameplay, in the form of one player chooses the word to be ...
11
votes
2answers
2k views

Guessing Game: computer generated number between 1 and 100 guessed by user

The required output is stated just before the main() function. Is there a better way to achieve it? I feel like I am repeating code unnecessarily but am unable to ...
5
votes
1answer
431 views

Rock, Paper, Scissors in Python

I was eventually going to add another computer and more options to this (i.e., Rock-paper-scissors-lizard-Spock) but I wanted to make sure I was using the best practice for this type of game. Any help ...
10
votes
2answers
159 views

Rock, paper, scissors

This is something I wrote as a reply to a deleted "Rock/paper/scissors [updated]" question. Since I can't post it as an answer (and the line-by-line analysis is gone as well), it might be nice to get ...
10
votes
4answers
545 views

Suggestions for a Dungeons and Dragons-like game

This game is similar to a Dungeons and Dragons game. How could I improve the efficiency of the program? For example, where can I add functions, records etc? This is for a school Controlled ...
7
votes
2answers
709 views

Repetitive For Loops in 2048 Game

I have the following function defined in a program that implements the 2048 game. I tried condensing the repeating part of the code into one loop containing +1 offset variables for the indices, which ...
5
votes
1answer
132 views

Fallout-style homework game

I've been going through LPHW (learn Python the hard way) lessons and I am now at exercise No36 where I have to create a similar game. Could you please review it and point out beginner mistakes? ...
6
votes
2answers
209 views

Python Hangman program

To learn Python, I've been working through Learn Python the Hard Way, and to exercise my Python skills I wrote a little Python Hangman game (PyHangman - creative, right?): ...
3
votes
1answer
115 views

Use if/else/elif conditionals to write a basic Rock Paper Scissors game

I have the following code for the Rock, Paper, Scissor game. The code works fine in Python 2.7. Are there other more concise, more readable, or more pythonic ways of solving this problem in Python? ...
4
votes
3answers
2k views

Rock, Paper, Scissors game assignment

This is an assignment that I have already turned in. It works great, but I was wondering if there are any flaws in the code, or how to write it in a more pythonic way. ...
2
votes
1answer
62 views

Verlet integration movement - doubt for on_key_press() methods

Based on my understanding of Verlet integration I tryed to use it over my Euler method to move my character in a 2D space. I will put only the neccessery code, but if anything else is needed I will ...
16
votes
4answers
3k views

Simple card game to learn OOP

My goal was to get my hands dirty in OOP by designing and using classes and getting started with inheritance and other OOP concepts. I have written a very small code to play a card Game called ...
6
votes
1answer
193 views

Simple console roguelike game

I have written this small game for the "learn python the hard way" book. I ask for some opinions about it and how to improve it. I know about pygame and others game engines but all the game runs in ...
5
votes
3answers
185 views

How object oriented is my Crazy Eights game?

I have this Crazy Eights game (which at the moment does not include crazy cards): ...
7
votes
3answers
150 views

Directly accessing class attributes in Rock Paper Scissors

I am reading a beginning Python programming book and in it the author says that you want to avoid accessing a class' attributes directly, but instead to create methods that return attribute values. ...
4
votes
1answer
94 views

How to make this lingo game more compact?

I made a lingo game using Python: You guess a word, and if its letter(s) is in the same spot as a hidden word's, you add [] around the letter. If it's in the hidden word, but not in the same spot, ...
9
votes
1answer
937 views

Self-playing Tetris game

I have an extremely simple self-playing Tetris game which I coded up and I am looking to see how it could be improved. It would also be a learning curve for me to see how those much better than I am ...
4
votes
3answers
897 views

Calculating scores for predictions of football scores

I am writing a program which calculates the scores for participants of a small "Football Score Prediction" game. Rules are: if the match result(win/loss/draw) is predicted correctly: 1 point if the ...
7
votes
1answer
953 views

Clean code and SOLID principles for a simple Python TicTacToe game

I recently read the book Clean Code and I also did some research on the SOLID principles. I'm looking for general feedback on if I was able to transpose the examples (written in Java) to Python while ...
2
votes
1answer
72 views

Python Hangman feedback

Just looking for some feedback on a hangman script. It works perfectly fine; I'm just trying to master the Python language, and the best place way to get better is to ask the true masters! ...
2
votes
0answers
110 views

How can I make this SimCity clone faster?

I am working on a SimCity clone, and I am noticing a drop in frame rate as I add more objects to my map, now this is expected, but, when I fill the whole screen, the game maintains about 300 fps. ...
5
votes
2answers
2k views
6
votes
1answer
175 views

Improvements on Python game?

This is a game I made in Python. While it is not my first, I am not happy with the result. I would like suggestions on ways I can make it better, more user-friendly, and more enjoyable. Also, if ...
6
votes
2answers
292 views

Text-based adventure game

I'm new to programming, and I would like to know if this is the right way to layout code. If anyone has any tips, please share them. ...
6
votes
2answers
418 views

Designing a simple Battleship game in Python

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 ...
6
votes
2answers
255 views

Simple anagram game with names of colors

This is a very simple anagram game that plays only with names of colors. I tried to focus on code design. I also wanted it to support further updates. But, my ...
1
vote
2answers
380 views

Bisection search game

I'm starting to learn Python and am trying to optimize this bisection search game. ...
2
votes
1answer
164 views

“Heads or Tails?” guessing game in Python

I'm pretty new to coding and I want to get an opinion on my coding. I am learning Python and I made a really simple heads and tails guessing game. Please give me some feedback! ...