Mad .Final
Mad .Final
Microproject
On
“Tic-Tac-Toe Game”
Submitted By
Guided By
Ms.A.D.Mate
Diploma Course in Computer Technology
Sinhgad Institutes
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.
SR NO CONTENTS PAGE NO
2 Rationale 03
4 Literature Review 04
5 Output 17
8 Skills Developed 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”
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.
5 Check all the options and features of 17/03/2025 24/03/2025 Jayesh Dive
pages and verify their workings.
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.
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.
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.
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
interface.They also tested the application on different Android devices and found that it was
compatible withvarious devices.3.
"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
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" />
<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">
<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" />
<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"
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"
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>
"
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;
// Player representation
// 0 - X // 1 - O int
activePlayer = 0;
int[] gameState = {2, 2, 2, 2, 2, 2, 2, 2, 2};
// State meanings:
// 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;
} else {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
5.0 Output
Android Studio
3 Software
During the course of this micro-project, we learnt how to do Tic Tac Toe Game app.
For Tic Tac Toe Game app we:
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.
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