![Logo](/congbangitiu/Battleship-Remastered/raw/main/assets/img/logo.jpg)
An online game created with HTML, CSS, Javascript and p5.js for Algorithm & Data Structures course in International University - VNUHCM!
We took an Algorithm & Data Structures course and the final project was creating a Battleship game. It was challenging but also incredibly fun! We had to implement different algorithms for generating ships and randomizing their placement on a grid, along with logic that could handle both human and computer input. That was just the tip of the iceberg though - we also had to handle game states and error checking, all while optimizing for speed and efficiency. One thing I loved about this project was how it brought together everything we learned throughout the course - from different data structures like linked lists to more advanced algorithms like minimax. Plus, getting to play against friends (or the computer) once we finished coding made all the hard work completely worth it!
Order | Name | ID | Github account | |
---|---|---|---|---|
1 | Nguyen Luan Cong Bang | ITITIU20163 | bangnguyen.071102@gmail.com | congbangitiu |
2 | Pham Minh Vu | ITDSIU20354 | pmvu.ityu@gmail.com | PMinhVu |
3 | Nguyen Quang Dieu | ITDSIU20031 | dieu5084@gmail.com | itzmealvin |
4 | Nguyen Hoang Anh Tu | ITDSIU20090 | nghganhtu@gmail.com | nghganhtu |
5 | Dang Nhat Huy | ITITIU20043 | dnhuy.ityu@gmail.com | Nhathuy1305 |
- Open the terminal on your IDE
- Clone the repo
git clone https://github.com/congbangitiu/Battleship-Remastered.git
- Check the file status
git status
- Change branch
git checkout 'branch_name'
Motivation is what drives us to succeed in life, and when it comes to computer science, algorithms & data structures provide the necessary tools to achieve that success. The classic game of Battleship relies heavily on these concepts as players must efficiently search through a grid of potential targets while maximizing their chances of hitting the opponent's ships. Optimization is key in this game, as slow searching can mean the difference between victory and defeat. This is where algorithms come into play - by implementing sophisticated searching techniques such as binary search or A* search, players can quickly traverse the board and locate enemy ships with minimal effort. Likewise, data structures like hash tables assist in storing player moves for easy retrieval later on. In combining these methods with strategic planning and intuition, players can become masters of modern-day Battleship strategy.
Order | Task | Assignee | Contribution |
---|---|---|---|
1 | Player class, Menu state, Project Management | Cong Bang | 20% |
2 | Multi-player State, Single player state, Statistics state | Minh Vu | 20% |
3 | New map state, Win state calling, Finding assets | Quang Dieu | 20% |
4 | Animation class, Button class, Ship class, Sketch, Draw, Swap map | Anh Tu | 20% |
5 | Github Management, Bot class, Instruction state | Nhat Huy | 20% |
- Language: JavaScript
- Library: p5.js
ChallengesβΌοΈ
- Task allocation for each team member
- Time management
- Using platform for communication (Drive, Trello)
- Working environment (Github)
Acknowledgmentsπ§
We would want to express our gratitude to Dr. Tran Thanh Tung for providing us with the chance to participate in this project and apply what we learned in theory into practice. This project's learning curve was steep, but it was well worth it for all of us. We have learned more about interface technologies to construct a functioning application that interacts with our project. Sir, we want to thank you again for all the hard work and expertise that you have put into your teaching. We'll make sure that all we've learned doesn't go to waste, and that we can master them better from now on β€οΈ