Python代写:BTE601 Battleship Game

从三个选题中选择一个程序来代写。选择的是第二个Battleship游戏。

Option I

In this assignment you are required to use Python to solve a problem of your choice. This could be a finance, accounting, science or any business, engineering or medical application. A game of your choice is ok too (no Graphical User interface would be required). If you are interested in writing a multi-user game, come see me and I will guide you or look up how sockets could be defined - there are many examples on the web. Of course, you can look up how to do things, but you need to use YOUR OWN CODE. Your program should include:

  1. Classes (use hiding, getters and setters, multiple constructors and methods).
  2. Use functions - make your main very short. Try not to use any long detailed logic in main and modularize your application.
  3. Input and Output files.
  4. Make your own data set. You can even use random functions to create data sets or use a data set that would be deemed appropriate for your application.
  5. Use static variables in classes so that you would give an entity an auto-incremented ID as needed.
  6. When using a data set, make sure you demonstrate your knowledge of sorting and searching (no need to prompt the user if you don’t want to, but feel free to design your application as you deem appropriate).
  7. For a very large extra credit, get a raspberry pi, configure it, and run the application on it.
  8. You must use some containers (lists and/or maps).
  9. You can use recursion if you know how and if you need it.
  10. You may use any of the functions I have on BB in the code or from the book.

Come up with something cool or something useful. It does not have to be long but it must show what you learned in the course. Please make sure it is all yours from the idea to the implementation. I made this so open ended so that you gauge it to how much you want to do and you are able to do - but it MUST be yours - don’t copy - it will not work. Come up with your own idea. Of course, no two ideas will come out similar, and if they do, the implementations will be completely different. Also, this must be something that has significance - as an idea and a prototype implementation. It can’t be something trivial. In other words, don’t give me a hello world program and expect that you will get a grade for it.

Option II

In this part, you will design and implement a client server battleship game. There will be two different components of this game and you can only collaborate with one other person on it. You must demo this in class and explain the code in detail.

Requirements

  1. TCP Server/ TCP Client.
  2. Maximum of two clients can play a game.
  3. Game rules are managed by the Server.
  4. Players play in turns.
  5. You must design a protocol for the following functions:
    • Login by a client to the server - login command. (You can keep logins and passwords in a file or in a database connected to the server)
    • A logout command.
    • A client can see a list of all logged in other clients by issuing a “who” command. The “who -l” command should result in a listing of who is online, and what their total score history has been.
    • A client can invite another client to start a game: “invite” command - and then “accept” or “reject” by the other party. Only a client who is not in a game can be invited. Once one party accepts an invitation, the Server will initiate the game as described below.
    • A client can issue a hit command with coordinates “hit (2,3)”. The server would issue an announcement to both players of the result of each play.
    • Once someone reaches a winning state, the game should be terminated by the server and the result announced.
    • Design a scoring system for each win, and keep a running total for each player.
    • A client could issue a “who -all” command to see the running score of all players in the system (logged in or not).
    • A client can broadcast messages to a group.
    • A client can be a spectator and watch a game (this part is a little more involved - do it last)
    • An admin client can broadcast messages.
  6. Once a game starts, the server will create a random size grid (square) that is not smaller than 8x8 and not larger than 24x24 and place a number of ships randomly (random placement and random number of ships in each game -10 max - of course they must be the same for each player), and will only announce the size of the grid, the number of the pieces and location of the pieces to the party who owns them). The game will start with the server tossing a coin of who would have the first turn, and the server would alternate turns between the two players.
  7. Your game must be multi threaded - and handle synchronization of lists.
  8. Have a celebratory flash screen when a win happens.
  9. You must design a protocol (text or objects are fine). Your final Latex project report should highlight the message structure of your protocol.
  10. Install the server on a cloud server or a pi that you put in the cloud and make sure you can connect to it as a battle ship client.
  11. Doing a GUI on the client would be a lot of extra credit.

Option III

Write a 5-6 page paper about ONE of the following topics (It must be in your own words):

  1. Compare Python with Java, C++ and Ruby and how programming languages and tools are evolving (cloud, mobility, IoT, features, enhancements, complexity, performance, openness, etc), and when the use of one would be more appropriate than the others (if you such preference exists).
  2. C++ 11 and C++ 14 features and enhancements - you must explain in your own words - don’t copy. Do the research. How does this make C++ compared to Python, Java and Ruby? Do you think using boost libraries place C++ ahead of those languages when it comes to abstraction? Why is C++ is still so popular in some settings? What are those settings and when would you use it over any of the other languages above?
  3. Advances in AI - Technical Perspective. What is new? What are the recent technical advances and challenges? How the technical landscape of Computational Sciences is well suited for yet another leap of advancements in Artificial Intelligence research and capabilities?
  4. Functional Programming - with examples of how different modern languages support functional programming - with examples of your own.
  5. The Internet of Things Development - You can discuss the different tools and platforms or you can discuss IoT applications in a specific domain (business, engineering or medical).
  6. Cloud computing Development platforms (any of these topics: architecture, possibilities, scale, application - why it makes business sense, etc). You will need to discuss what services such as Azure, AWS or Bluemix offer and how this is revolutionizing software development. You can also approach this from an IaaS, PaaS, SaaS perspective but you need to discuss the stack of tools and the architecture along with some applications - possibly in a related domain (use of a business case scenario is perfectly fine).
  7. Social Media Analytics - benefits, and what it means to business.
  8. Big Data, Data Mining and Machine Learning - you could be general or use industry specific examples - but you need to discuss tools and architecture.
  9. Any other topic - but I will have to approve it. Send me an abstract. It must be related to programming, application development or specific technologies in a specific domain.

You must appropriately cite your sources in appropriate format. You can use IEEE format or LNCS format for your paper - or you can choose another format as you deem appropriate.