Mobile Application Development

Mobile Application Development

Mobile Application Development

Programming Assignment Help

At Programming Homework Tutors, we believe in providing our students with practical, real-world examples of how to apply the concepts they learn in class. That’s why we’ve developed a variety of sample projects to help you see how our courses can be used to create impactful solutions in your field of study.

 

Objectives-

This is an individual assignment. Students are not permitted to work in a group when writing this assignment.

 

Background

In this assignment, you are required to develop the Tic-tac-toe game app using Android or iOS. Figure 1 illustrates a completed game. You could see that there are nine squares, two players taking turns to draw circles and crosses. The player who can draw three circles or crosses horizontally, vertically or diagonally wins the game. In the figure below, Xs have won the game. You are required to perform two tasks, the descriptions for which are as follows:

Figure 1: Tic Tac Toe

Task 1 (Developing the app)                       [30 Marks]

 

In this task you are required to develop the app. Use the following specifications for your app:

 

The game should load with the home screen. This screen will contain “Start”, “High score” and “Exit” buttons.

On clicking the start button a new screen appears. This is the game screen; the players will take turns to play the game. This screen will contain “End Game” and “Home screen” buttons.

The game layout will look like figure 1 (you can use any colours or images for representing Os and Xs).

The game should keep track of the number of moves that had occurred. A Tic-tac-toe game has 9 moves at max. When the count reaches 9, it means that the game is a tie.

The game should keep track of which player’s turn it is, O or X. And draw the corresponding shape on the square which is clicked. Make sure that the square is empty and does not have another shape on it.

The game should have a checkWin function, the function will check for the following four cases. If d is true and any of a, b, or c are true the system will declare a winner.

All the values in a row are the same

All the values in a column are the same

All the values in a diagonal are the same

The values are either X or O and not blank

You will need to write code for the app to play the game against human players. The game should start by randomly selecting the player who makes the first move. The player who gets the first turn will get Os while the second player will get Xs.

You should write code for a method called nextMove, which should know the state of the grid and decide the next move accordingly. This method should start by checking whether the human player is about to win the game (has two Xs in a row with a third empty block). If this is the case O should be placed next to the two crosses.

At the end of the game a result screen should appear. This would appear if the human player won, lost or tied the game.

The result screen will contain the “You win”, “You lose” or “Tied” message depending on whether the human player has won, lost or tied the game. This screen will also display the number of moves for that game. The screen will have a text box for the player to enter their name. It will contain, “Save score”, “Play again” and “Exit” buttons.

The scores will be saved in a local database. You can use SQLite database for this purpose as it is support by both Android and iOS. The database will contain only one table which will have three columns player name, number of moves and date_time. You should use prepared statements rather than creation of SQL statements using string concatenation.

The high scores screen will fetch the scores from the database and display it in ascending order for score. This screen will have a “Play again” and “Exit” buttons.

 

 

Task 2 (Documentation)                               [10 Marks]

 

The project report should conform to the following basic requirements.

 

Include a cover page with your student details.

Include the following two sections: 1. App Demo

Play a full game against computer and include screen shots for every move.

Include screen shots of the code for nextMove function and explain it. Explain the decision-making process behind every move. Include screen shots of nextMove and checkWin functions.

Include a screen shot of the high scores page and a screen shot of the high score table from the database.

 

Reflection

Include details about incomplete tasks

Include details about challenges that you faced while working on the app

Any other comments

 

Appendices may optionally be included if they are not excessive.

Strict minimum of 500 words and strict maximum of 1,000 words, including the bibliography and any appendices. Marks will be deducted for not meeting this requirement.

 

Disclaimer


The sample projects provided on our website are intended to be used as a guide and reference for educational purposes only. While we have made every effort to ensure that the projects are accurate and up-to-date, we do not guarantee their accuracy or completeness. The projects should be used at your own discretion, and we are not responsible for any loss or damage that may result from their use.
At Programming Homework Tutors, we are dedicated to helping students and educators achieve their goals by providing them with the resources they need to succeed. Our website offers a variety of tools and resources that can help you with the project mentioned above.
Whether you need help with research, project management, or technical support, our team of experts is here to assist you every step of the way. We offer online courses, tutorials, and community forums where you can connect with other learners and get the support you need to succeed.
If you’re looking to take your skills to the next level and make an impact in your field, we invite you to explore our website and see how we can help you achieve your goals.

No Comments

Post A Comment

This will close in 20 seconds