Skip to content

Commit

Permalink
fix and cleaning proj
Browse files Browse the repository at this point in the history
  • Loading branch information
hadi-norouzi committed Dec 13, 2019
1 parent 4318c33 commit 1ff74aa
Show file tree
Hide file tree
Showing 12 changed files with 71 additions and 65 deletions.
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GNU GENERAL PUBLIC LICENSE
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

This is a simple app created with flutter

<img src="./Screen Shot ios.png" width="200">
<img src="./Screen Shot android.png" width="170">
<img src="./ScreenShots/Screen Shot ios.png" width="200">

`flutter packages get`

Expand Down
File renamed without changes
File renamed without changes
12 changes: 6 additions & 6 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* TicTocToe.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TicTocToe.app; sourceTree = BUILT_PRODUCTS_DIR; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
Expand Down Expand Up @@ -91,7 +91,7 @@
97C146EF1CF9000F007C117D /* Products */ = {
isa = PBXGroup;
children = (
97C146EE1CF9000F007C117D /* TicTocToe.app */,
97C146EE1CF9000F007C117D /* Runner.app */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -139,7 +139,7 @@
);
name = Runner;
productName = Runner;
productReference = 97C146EE1CF9000F007C117D /* TicTocToe.app */;
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
Expand Down Expand Up @@ -327,7 +327,7 @@
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.hadinorouzi.tictoctoe;
PRODUCT_NAME = TicTocToe;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 4.0;
Expand Down Expand Up @@ -464,7 +464,7 @@
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.hadinorouzi.tictoctoe;
PRODUCT_NAME = TicTocToe;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand Down Expand Up @@ -495,7 +495,7 @@
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.hadinorouzi.tictoctoe;
PRODUCT_NAME = TicTocToe;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 4.0;
Expand Down
8 changes: 4 additions & 4 deletions ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "TicTocToe.app"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
Expand All @@ -31,7 +31,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "TicTocToe.app"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
Expand All @@ -54,7 +54,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "TicTocToe.app"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
Expand All @@ -71,7 +71,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "TicTocToe.app"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
Expand Down
7 changes: 0 additions & 7 deletions lib/Board.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ class Board extends StatelessWidget {
? Opacity(
opacity: won ? 1 : 0.0,
child: FlareActor("asset/celebration.flr",
// You can find the
// example
// project
// here: https://www.2dimensions.com/a/castor/files/flare/change-color-example
fit: BoxFit.contain,
animation: won ? "Untitled" : null,
alignment: Alignment.center,
Expand All @@ -38,8 +34,6 @@ class Board extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// crossAxisAlignment: CrossAxisAlignment.center,
child: Row(
children: <Widget>[
Expanded(
Expand Down Expand Up @@ -87,7 +81,6 @@ class Board extends StatelessWidget {
],
),
),
// SizedBox(width: 3),
Divider(
color: Color(0xFF2C6171),
height: 10,
Expand Down
2 changes: 0 additions & 2 deletions lib/ResetButton.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class ResetButton extends StatelessWidget {
return IconButton(
icon: Icon(Icons.autorenew),
onPressed: () {
print('$context this reset');
showDialog(
context: context,
builder: (BuildContext context) {
Expand All @@ -22,7 +21,6 @@ class ResetButton extends StatelessWidget {
child: Text('Cancel'),
onPressed: () {
Navigator.of(context).pop();
//reset();
},
),
FlatButton(
Expand Down
12 changes: 4 additions & 8 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import 'package:flare_flutter/flare_controller.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:tic_toc_toe/Board.dart';
import 'package:tic_toc_toe/ResetButton.dart';
import 'package:tic_toc_toe/ScoreBoard.dart';
import 'package:TicTocToe/Board.dart';
import 'package:TicTocToe/ResetButton.dart';
import 'package:TicTocToe/ScoreBoard.dart';

main() => runApp(MyApp());

Expand Down Expand Up @@ -57,7 +57,6 @@ class MyAppState extends State<MyApp> with FlareController {

bool isEmptyBoard() {
for (int i = 0; i < boolPlayer.length; i++) {
// print('$boolPlayer this in loop');
if (boolPlayer[i] != 0) {
return false;
}
Expand All @@ -78,7 +77,7 @@ class MyAppState extends State<MyApp> with FlareController {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
// bottomSheet: ,

appBar: AppBar(
backgroundColor: Color(0xFF2C6171),
title: Text(
Expand Down Expand Up @@ -130,8 +129,6 @@ class MyAppState extends State<MyApp> with FlareController {
(boolPlayer[2] == 1 && boolPlayer[5] == 1 && boolPlayer[8] == 1) ||
(boolPlayer[0] == 1 && boolPlayer[4] == 1 && boolPlayer[8] == 1) ||
(boolPlayer[2] == 1 && boolPlayer[4] == 1 && boolPlayer[6] == 1)) {
// print('player O win');
//show flare and hide

setState(() {
winner = 'O Win';
Expand All @@ -154,7 +151,6 @@ class MyAppState extends State<MyApp> with FlareController {
(boolPlayer[2] == 2 && boolPlayer[5] == 2 && boolPlayer[8] == 2) ||
(boolPlayer[0] == 2 && boolPlayer[4] == 2 && boolPlayer[8] == 2) ||
(boolPlayer[2] == 2 && boolPlayer[4] == 2 && boolPlayer[6] == 2)) {
// print('player X win');
setState(() {
winner = 'X Win';
won = true;
Expand Down
59 changes: 54 additions & 5 deletions pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.2"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.0"
version: "2.4.0"
boolean_selector:
dependency: transitive
description:
Expand All @@ -29,6 +43,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.11"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
flare_dart:
dependency: transitive
description:
Expand All @@ -53,20 +81,27 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.5"
version: "0.12.6"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.7"
version: "1.1.8"
path:
dependency: transitive
description:
Expand All @@ -81,6 +116,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0+1"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
quiver:
dependency: transitive
description:
Expand Down Expand Up @@ -134,7 +176,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.5"
version: "0.2.11"
typed_data:
dependency: transitive
description:
Expand All @@ -149,6 +191,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
sdks:
dart: ">=2.2.2 <3.0.0"
dart: ">=2.4.0 <3.0.0"
flutter: ">=1.7.8+hotfix.3"
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: tic_toc_toe
name: TicTocToe
description: tictoctoe game with flutter

# The following defines the version and build number for your application.
Expand Down
30 changes: 0 additions & 30 deletions test/widget_test.dart

This file was deleted.

0 comments on commit 1ff74aa

Please sign in to comment.