pacampbell / game Goto Github PK
View Code? Open in Web Editor NEWJava 2D game library
Java 2D game library
Rectangle Class needs to be reworked.
I played the game and can't figure out how to best the first boss. I think it is broken because when I plug in my usb controller it didn't recognize it.
Is it possible for me to run the code? Or are these just helper classes, I did not find the main class when I wanted to run the code.
Please give me some examples of using this framework.
make.bat and make.sh currently don't include the files in the gui folder, so they don't get compiled
Quaternion.java needs to be written.
A project of this size needs a new feature everyday.... Perhaps you should consider a new project to get you in the habit of adding more frequent contributions. Get in touch with me if you want to learn better software engineering habits. We have a perfect project for you to participate in.
Matrix4 class needs to be rewritten.
Extending the Graphics2D class, particularly to accepted Vector2, Point, and Texture2D as arguments. Also incorporating Matrix, and Quaternion operations and transformations to the draw method as well.
import random
class Player:
def init(self, name):
self.name = name
self.health = 100
self.position = (0, 0)
class BattlegroundGame:
def init(self, num_players):
self.players = [Player(f"Player {i+1}") for i in range(num_players)]
self.round = 1
def start_game(self):
print("Welcome to the Battleground Game!")
print(f"Starting with {len(self.players)} players.")
self.play_rounds()
def play_rounds(self):
while len(self.players) > 1:
print(f"\nRound {self.round}:")
self.play_round()
self.round += 1
print("\nGame Over!")
print(f"{self.players[0].name} wins!")
def play_round(self):
for player in self.players:
if player.health <= 0:
continue
print(f"\n{player.name}'s turn:")
self.attack(player)
def attack(self, attacker):
target = random.choice([p for p in self.players if p != attacker and p.health > 0])
damage = random.randint(10, 30)
target.health -= damage
print(f"{attacker.name} attacks {target.name} for {damage} damage.")
if target.health <= 0:
print(f"{target.name} has been eliminated!")
def main():
num_players = 50
game = BattlegroundGame(num_players)
game.start_game()
if name == "main":
main()
Good
Extending the Graphics2D class, particularly to accepted Vector2, Point, and Texture2D as arguments. Also incorporating Matrix, and Quaternion operations and transformations to the draw method as well.
Need to complete all the methods in the Matrix class.
Point Class needs to be reworked.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.