0% found this document useful (0 votes)
5 views34 pages

Mad .Final

The document outlines a micro-project focused on developing a Tic-Tac-Toe game app as part of a Diploma in Computer Technology course. It includes the project's aim, intended outcomes, methodology, action plan, required resources, and literature review related to mobile application development. The project is guided by Ms. A.D. Mate and is intended for the academic year 2024-2025 at Sou. Venutai Chavan Polytechnic, Pune.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views34 pages

Mad .Final

The document outlines a micro-project focused on developing a Tic-Tac-Toe game app as part of a Diploma in Computer Technology course. It includes the project's aim, intended outcomes, methodology, action plan, required resources, and literature review related to mobile application development. The project is guided by Ms. A.D. Mate and is intended for the academic year 2024-2025 at Sou. Venutai Chavan Polytechnic, Pune.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

A

Microproject

On

“Tic-Tac-Toe Game”

Submitted By

Jayesh Arun (59)

Guided By

Ms.A.D.Mate
Diploma Course in Computer Technology

(As per directives of I Scheme, MSBTE)

Sinhgad Institutes

Sinhgad Technical Education Society’s

SOU.VENUTAI CHAVAN POLYTECHNIC


PUNE - 411041
ACADEMIC YEAR 2024-2025
Maharashtra State Board of
Technical Education

Certificate
This is to certify that Mr. Jayesh Arun Dive with Roll No. 37 of Semester VI of
Diploma in Computer Technology of Institute Sou. Venutai Chavan
Polytechnic (Code: 0040) has successfully completed the Micro-Project in
Mobile Application Development (22617) for the academic year 2024-2025 as
prescribed in the curriculum.

Place: SVCP, Pune Enrollment No: 2200400355


Date: Exam Seat No: 173891

Ms.A.D.Mate Mrs.A.V.Kurkute Dr.(Mrs.)M.S.Jadhav


Course Teacher HOD Principal
INDEX

SR NO CONTENTS PAGE NO

1 Aim of the Micro-Project 01

2 Rationale 03

3 Course Outcomes Achieved 03

4 Literature Review 04

5 Output 17

6 Actual Methodology Followed 17

7 Actual Resources Used 18

8 Skills Developed 18

9 Applications of Micro Project 18

10 Area of Future Improvement 18

11 Conclusion 19

12 References 19
Mobile Application Development - 22617 Tic-Tac-Toe Game

-
Department of Computer Technology Academic Year 2024-2025 2
Mobile Application Development - 22617 Tic-Tac-Toe Game

Annexure-I
Micro-Project Proposal
“Tic-Tac-Toe Game”

1.0 Aim of the Micro-Project:


The Micro-project aims to create a Tic-Tac-Toe Game.

2.0 Intended Course Outcomes:

a) Interprete features of Android operating System.

b) Configure Android environment and development tools.

c) Develop rich user Interfaces by using layouts and controls.

d) Use User Interface components for android application development.

3.0 Proposed methodology:

The Micro-project aims to create Tic Tac Toe game app.

I. Study and learn to use Tic Tac Toe game app.


II. Learn and used various layouts in Tic Tac Toe game app.
III. Design application page according to functions and working of software.
IV. Check all the options and features of pages and verify their workings.
V. Prepare the final report.
Mobile Application Development - 22617 Tic-Tac-Toe Game

Department of Computer Technology Academic Year 2024-2025 4


Department of Computer Technology Academic Year 2024-2025 1
Mobile Application Development - 22617 Tic-Tac-Toe Game

4.0 Action Plan:

Sr. Details of Activity Planned Planned Name of


No. Start Date Finish responsible
Date
Team
members
1 Identify the requirements of the 17/02/2025 24/02/2025 Jayesh Dive
project.

2 Study and learn to use Tic Tac Toe 24/02/2025 03/03/2025 Jayesh Dive
game app.

3 Learn and used various layouts in Tic 03/03/2025 10/03/2025 Jayesh Dive
Tac Toe game app.

4 Design application page according to 10/03/2025 17/03/2025 Jayesh Dive


functions and working of software.

5 Check all the options and features of 17/03/2025 24/03/2025 Jayesh Dive
pages and verify their workings.

6 Prepare the final report. 24/03/2025 04/04/2025 Jayesh Dive

5.0 Resources Required:

S. No. Resources required Specifications

1 Computer system Intel(R) Pentium CPU, RAM 4 GB

Operating System Windows 10, 64 Bit Operating System


2

3 Software Android Studio

6.0 Team members:

Department of Computer Technology Academic Year 2024-2025 6


S. No. Roll. number Name of Student

59 Kanishka Gumgaonkar
1
Mobile Application Development - 22617 Tic-Tac-Toe Game

Annexure-II
Micro-Project Report

1.0 Rationale:
Android application development is one of the rising and growing trend in the industry
of mobile. This course examines the principles of mobile application design and covers
the necessary concepts which are required to understand mobile based applications and
develop Android based Applications in particular. After completing this course students
will design and build a variety of real-time Apps using Android.

2.0 Aim of the Micro-Project:


The Micro-project aims to create Tic Tac Toe game app.

3.0 Course Outcomes Achieved:

a) Interpreter features of Android operating System.

b) Configure Android environment and development tools.

c) Develop rich user Interfaces by using layouts and controls.

d) Use User Interface components for android application development.

Department of Computer Technology Academic Year 2024-2025 8


Mobile Application Development - 22617 Tic-Tac-Toe Game

4.0 Literature Review:

1. Layouts:
The basic building block for user interface is a View object which is created from the
View class and occupies a rectangular area on the screen and is responsible for drawing
and event handling.
View is the base class for widgets, which are used to create interactive UI components
like buttons, text fields, etc. The ViewGroup is a subclass of View and provides
invisible container that hold other Views or other ViewGroups and define their layout
properties.

At third level we have different layouts which are subclasses of ViewGroup class and a
typical layout defines the visual structure for an Android user interface and can be
created either at run time using View/ViewGroup objects or you can declare your layout
using simple XML file main_layout.xml which is located in the res/layout folder in
this project.

There are number of Layouts provided by Android which you will use in almost all the
Android applications to provide different view, look and feel.
1. Linear Layout
Linear Layout is a view group that aligns all children in a single direction, vertically or
horizontally.
2. Relative Layout
Relative Layout is a view group that displays child views in relative positions.
3. Table Layout
Table Layout is a view that groups views into rows and columns.

Department of Computer Technology Academic Year 2024-2025 9


Mobile Application Development - 22617 Tic-Tac-Toe Game

4. Absolute Layout
Absolute Layout enables you to specify the exact location of its children.
5. Frame Layout
The Frame Layout is a placeholder on screen that you can use to display a single view

2. Components of Screen:
Application components are the essential building blocks of an Android application.
These components are loosely coupled by the application manifest file
AndroidManifest.xml that
describes each component of the application and how they interact. Interface elements
include but
are not limited to:
• Input Controls: checkboxes, radio buttons, dropdown lists, list boxes, buttons,
toggles,
text fields, date field
• Navigational Components: breadcrumb, slider, search field, pagination, slider,
tags, icons
• Informational Components: tooltips, icons, progress bar, notifications,
message boxes,
modal windows.

Department of Computer Technology Academic Year 2024-2025 10


Mobile Application Development - 22617 Tic-Tac-Toe Game

3. Other attributes:
• layout_width
Specifies the width of the View or ViewGroup

• layout_height
Specifies the height of the View or ViewGroup
• layout_marginTop
Specifies extra space on the top side of the View or ViewGroup
• layout_marginBottom
Specifies extra space on the bottom side of the View or ViewGroup
• layout_marginLeft
Specifies extra space on the left side of the View or ViewGroup
• layout_marginRight
Specifies extra space on the right side of the View or ViewGroup
• layout_gravity
Specifies how child Views are positioned
• layout_weight
Specifies how much of the extra space in the layout should be allocated to the View

 Introduction

"Development of Tic-Tac-Toe Game for Android Platform using Java Language" by G. V. Rao
etal. (2017): This study describes the development of a Tic-Tac-Toe game application for
Android platform using Java language. The authors utilized Android Studio and Java to
implement the gamelogic and user interface. They also conducted user testing to evaluate the
performance of the gameand found that users were satisfied with the game's performance.2.

"Android Based Tic Tac Toe Game Application Development" by S. G. Bujade et al. (2016):
Thisstudy presents the development of a Tic-Tac-Toe game application for Android platform
usingJava language. The authors utilized Android Studio to implement the game logic and user

Department of Computer Technology Academic Year 2024-2025 11


Mobile Application Development - 22617 Tic-Tac-Toe Game

interface.They also tested the application on different Android devices and found that it was
compatible withvarious devices.3.

"Design and Implementation of Android-based Tic-Tac-Toe Game" by F. A. Hadi et al.


(2019):This study describes the development of a Tic-Tac-Toe game application for Android
platformusing Java language. The authors utilized Android Studio and Java toimplement the
game logic and user interface. They also conducted user testing to evaluate the performance of
the game and found that users were satisfied with the game's performance.4.

"Development of Tic Tac Toe Game for Android Platform Using Java Programming Language"
by R. Kumar et al. (2016): This study presents the development of a Tic-Tac-Toe game
applicationfor Android platform using Java language. The authors utilized Android Studio to
implement thegame logic and user interface. They also tested the application on different
Android devices andfound that it was compatible with various.

Overall, these studies suggest that developing a Tic-Tac-Toe game application for Android
platform using Java language is a feasible and effective approach. The use of Android Studio
andJava language allows for the efficient implementation of game logic and user interface, as
well ascompatibility with various Android devices. Additionally, user testing is an important
aspect ofevaluating the performance and satisfaction of the application.Overall, the literature
suggests that creating a login page app in Android (without databaseconnectivity) is an
important project that requires a focus on security, user experience, andcustomization. The
literature provides several insights into the implementation of login authenticationsystems
and highlights the importance of using secure login processes to protect user data.

 activity_main.xml

<?xml version="1.0" encoding="utf-8"?>


<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"

Department of Computer Technology Academic Year 2024-2025 12


Mobile Application Development - 22617 Tic-Tac-Toe Game

android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/green"
tools:context=".MainActivity">

<!--title text-->

<TextView android:id="@+id/textView"
android:layout_width="wrap_content
"
android:layout_height="wrap_content
" android:layout_marginTop="23dp"
android:text="GFG Tic Tac Toe"
android:textSize="45sp"
android:textStyle="bold"
app:fontFamily="cursive"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<!--image of the grid-->


<ImageView android:id="@+id/imageView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:contentDescription="Start"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView
" app:srcCompat="@drawable/grid" />

Department of Computer Technology Academic Year 2024-2025 13


Mobile Application Development - 22617 Tic-Tac-Toe Game

<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="0dp"
android:layout_height="420dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="@+id/imageView"
app:layout_constraintEnd_toEndOf="@+id/imageView"
app:layout_constraintStart_toStartOf="@+id/imageView"
app:layout_constraintTop_toTopOf="@+id/imageView"> <LinearLayout
android:layout_width="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:orientation="horizontal">

<!--images of the grid boxes-->


<ImageView
android:id="@+id/imageView0"
android:layout_width="match_parent
"
android:layout_height="match_parent
" android:layout_weight="1"
android:onClick="playerTap"
android:padding="20sp"
android:tag="0" />

<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent
"
android:layout_height="match_parent
" android:layout_weight="1"
android:onClick="playerTap"
android:padding="20sp"
android:tag="1" />

Department of Computer Technology Academic Year 2024-2025 14


Mobile Application Development - 22617 Tic-Tac-Toe Game

<ImageView
android:id="@+id/imageView2"
android:layout_width="match_parent
"
android:layout_height="match_parent
" android:layout_weight="1"
android:onClick="playerTap"
android:padding="20sp"
android:tag="2" />

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal">

<ImageView
android:id="@+id/imageView3"
android:layout_width="match_parent
"
android:layout_height="match_parent
" android:layout_weight="1"
android:onClick="playerTap"
android:padding="20sp"
android:tag="3" />

<ImageView
android:id="@+id/imageView4"

Department of Computer Technology Academic Year 2024-2025 15


Mobile Application Development - 22617 Tic-Tac-Toe Game

android:layout_width="match_parent
"
android:layout_height="match_parent
" android:layout_weight="1"
android:onClick="playerTap"
android:padding="20sp"
android:tag="4" />

<ImageView
android:id="@+id/imageView5"
android:layout_width="match_parent
"
android:layout_height="match_parent
" android:layout_weight="1"
android:onClick="playerTap"
android:padding="20sp"
android:tag="5" />

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal">

<ImageView
android:id="@+id/imageView6"
android:layout_width="match_parent
"
android:layout_height="match_parent
" android:layout_weight="1"

Department of Computer Technology Academic Year 2024-2025 16


Mobile Application Development - 22617 Tic-Tac-Toe Game

android:onClick="playerTap"
android:padding="20sp"
android:tag="6" />

<ImageView
android:id="@+id/imageView7"
android:layout_width="match_parent
"
android:layout_height="match_parent
" android:layout_weight="1"
android:onClick="playerTap"
android:padding="20sp"
android:tag="7" />

<ImageView
android:id="@+id/imageView8"
android:layout_width="match_parent
"
android:layout_height="match_parent
" android:layout_weight="1"
android:onClick="playerTap"
android:padding="20sp"

android:tag="8" />
</LinearLayout>

</LinearLayout>

<!--game status text display-->


<TextView android:id="@+id/status"
android:layout_width="wrap_content

Department of Computer Technology Academic Year 2024-2025 17


Mobile Application Development - 22617 Tic-Tac-Toe Game

"
android:layout_height="wrap_conten
t"
android:layout_marginBottom="15sp
" android:text="Status"
android:textSize="28sp"
android:textStyle="italic"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout" />

</androidx.constraintlayout.widget.ConstraintLayout>

 MainActivity.java
import android.os.Bundle; import
android.view.View; import
android.widget.ImageView;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {


boolean gameActive = true;

// Player representation

// 0 - X // 1 - O int
activePlayer = 0;
int[] gameState = {2, 2, 2, 2, 2, 2, 2, 2, 2};

// State meanings:

Department of Computer Technology Academic Year 2024-2025 18


Mobile Application Development - 22617 Tic-Tac-Toe Game

// 0 - X
// 1 - O
// 2 - Null
// put all win positions in a 2D array
int[][] winPositions = {{0, 1, 2}, {3, 4, 5}, {6, 7, 8},
{0, 3, 6}, {1, 4, 7}, {2, 5, 8},
{0, 4, 8}, {2, 4, 6}};
public static int counter = 0;

// this function will be called every time a //


players tap in an empty box of the grid public
void playerTap(View view) { ImageView img
= (ImageView) view;
int tappedImage = Integer.parseInt(img.getTag().toString());

// game reset function will be called //


if someone wins or the boxes are full
if (!gameActive) { gameReset(view);
//Reset the counter counter = 0;
}

// if the tapped image is empty if


(gameState[tappedImage] == 2) {
// increase the counter
// after every tap
counter++;

// check if its the last box if


(counter == 9) { // reset the
game gameActive = false;
}

Department of Computer Technology Academic Year 2024-2025 19


Mobile Application Development - 22617 Tic-Tac-Toe Game

// mark this position


gameState[tappedImage] = activePlayer;

// this will give a motion //


effect to the image
img.setTranslationY(-
1000f);

// change the active player // from 0 to 1 or 1


to 0 if (activePlayer == 0) { // set the image
of x img.setImageResource(R.drawable.x);
activePlayer = 1;
TextView status = findViewById(R.id.status);

// change the status


status.setText("O's Turn - Tap to play");

} else {

// set the image of o


img.setImageResource(R.drawable.o);
activePlayer = 0;
TextView status = findViewById(R.id.status);

// change the status


status.setText("X's Turn - Tap to play");
}
img.animate().translationYBy(1000f).setDuration(300);
} int flag =
0;
// Check if any player has won if counter is > 4 as min 5 taps are

Department of Computer Technology Academic Year 2024-2025 20


Mobile Application Development - 22617 Tic-Tac-Toe Game

// required to declare a winner


if (counter > 4) {
for (int[] winPosition : winPositions) { if (gameState[winPosition[0]]
== gameState[winPosition[1]] &&
gameState[winPosition[1]] ==
gameState[winPosition[2]] &&
gameState[winPosition[0]] != 2) {
flag = 1;

// Somebody has won! - Find out who!


String winnerStr;

// game reset function be called


gameActive = false;
if (gameState[winPosition[0]] == 0) {
winnerStr = "X has won";
} else { winnerStr = "O has
won";
}
// Update the status bar for winner announcement
TextView status = findViewById(R.id.status);
status.setText(winnerStr);
}
}
// set the status if the match draw
if (counter == 9 && flag == 0) {
TextView status = findViewById(R.id.status); status.setText("Match
Draw");
}
}
}

Department of Computer Technology Academic Year 2024-2025 21


Mobile Application Development - 22617 Tic-Tac-Toe Game

// reset the game


public void gameReset(View view) {
gameActive = true;
activePlayer = 0;
//set all position to Null
Arrays.fill(gameState, 2);
// remove all the images from the boxes inside the grid
((ImageView) findViewById(R.id.imageView0)).setImageResource(0);
((ImageView) findViewById(R.id.imageView1)).setImageResource(0);
((ImageView) findViewById(R.id.imageView2)).setImageResource(0);
((ImageView) findViewById(R.id.imageView3)).setImageResource(0);
((ImageView) findViewById(R.id.imageView4)).setImageResource(0);
((ImageView) findViewById(R.id.imageView5)).setImageResource(0);
((ImageView) findViewById(R.id.imageView6)).setImageResource(0);
((ImageView) findViewById(R.id.imageView7)).setImageResource(0);
((ImageView) findViewById(R.id.imageView8)).setImageResource(0);

TextView status = findViewById(R.id.status); status.setText("X's


Turn - Tap to play");
}

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}

Department of Computer Technology Academic Year 2024-2025 22


Mobile Application Development - 22617 Tic-Tac-Toe Game

5.0 Output

6.0 Actual Methodology Followed:

The Micro-project aims to create Tic Tac Toe game app.

I. Study and learn to use Tic Tac Toe game app.


II. Learn and used various layouts in Tic Tac Toe game app.

Department of Computer Technology Academic Year 2024-2025 23


Mobile Application Development - 22617 Tic-Tac-Toe Game

III. Design application page according to functions and working of software.


IV. Check all the options and features of pages and verify their workings. V. Prepare
the final report.

7.0 Actual Resources Used:

S. No. Resources required Specifications

1 Computer system Intel(R) Pentium CPU, RAM 8 GB

2 Operating System Windows 10, 64 Bit Operating System

Android Studio
3 Software

8.0 Skills Developed:

During the course of this micro-project, we learnt how to do Tic Tac Toe Game app.
For Tic Tac Toe Game app we:

a) Interpreter features of Android operating System.


b) Configure Android environment and development tools.
c) Develop rich user Interfaces by using layouts and controls.
d) Use user interface components for android application development.

9.0 Applications of this Micro-project:

Developing a Tic-Tac-Toe game app in mobile app development teaches essential skills like
user interface design, logic implementation, user interaction,state,management, UI/UX
principles, multiplayer functionality,testing, debugging, and app publishing. It's a practical way
to learn key aspects of building mobile applications.

Department of Computer Technology Academic Year 2024-2025 24


Mobile Application Development - 22617 Tic-Tac-Toe Game

10.0 Area of future Improvement:

In the future, Tic-Tac-Toe game app in mobile development include enhancing AI, adding
multiplayer features, customization options, statistics/leaderboards, interactive tutorials,
accessibility features, animations/sound effects, cross-platform compatibility, in-app purchases,
and community engagement.

11.0 Conclusion:

In this project, we learned and performed to create Tic Tac Toe Game app.

12.0 References:

https://www.geeksforgeeks.org/tic-tac-toe-game-in-android/
https://chat.openai.com/ https://www.geeksforgeeks.org/android-ui-
layouts/ https://en.wikipedia.org/wiki/Tic-tac-toe

Department of Computer Technology Academic Year 2024-2025 25


Mobile Application Development - 22617 Tic-Tac-Toe Game

Department of Computer Technology Academic Year 2024-2025 26

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy