Skip to content
Snippets Groups Projects
Commit 34d68781 authored by Sofiane Lasri's avatar Sofiane Lasri
Browse files

Merge remote-tracking branch 'refs/remotes/origin/main'

Conflicts:
	Pendu.xcodeproj/project.pbxproj
	Pendu/GameEngine.swift
parents f6ac7b16 9585d309
Branches
No related tags found
No related merge requests found
.DS_Store 0 → 100644
File added
......@@ -9,6 +9,7 @@
/* Begin PBXBuildFile section */
BF1D4A112A1CF23B002F97CB /* GameEngineMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5A7EC82A13BF8A00168B16 /* GameEngineMock.swift */; };
BF1D4A122A1CF36D002F97CB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF3C480D2A0A1FCA00CE128F /* AppDelegate.swift */; };
159D0F242A13B19C0029D0F7 /* 1200x680_jp_zadi.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 159D0F232A13B19C0029D0F7 /* 1200x680_jp_zadi.jpeg */; };
BF3C480E2A0A1FCA00CE128F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF3C480D2A0A1FCA00CE128F /* AppDelegate.swift */; };
BF3C48102A0A1FCA00CE128F /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF3C480F2A0A1FCA00CE128F /* SceneDelegate.swift */; };
BF3C48122A0A1FCA00CE128F /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF3C48112A0A1FCA00CE128F /* ViewController.swift */; };
......@@ -44,6 +45,7 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
159D0F232A13B19C0029D0F7 /* 1200x680_jp_zadi.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = 1200x680_jp_zadi.jpeg; path = ../../1200x680_jp_zadi.jpeg; sourceTree = "<group>"; };
BF3C480A2A0A1FCA00CE128F /* Pendu.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Pendu.app; sourceTree = BUILT_PRODUCTS_DIR; };
BF3C480D2A0A1FCA00CE128F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
BF3C480F2A0A1FCA00CE128F /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
......@@ -119,6 +121,7 @@
BF3C481B2A0A1FCD00CE128F /* LaunchScreen.storyboard */,
BF3C481E2A0A1FCD00CE128F /* Info.plist */,
BF3C48162A0A1FCA00CE128F /* Pendu.xcdatamodeld */,
159D0F232A13B19C0029D0F7 /* 1200x680_jp_zadi.jpeg */,
D082CCC82A0A33D600D97981 /* GameEngine.swift */,
BF3C48422A0A3CFF00CE128F /* GameEngineTests.swift */,
BF5A7EC82A13BF8A00168B16 /* GameEngineMock.swift */,
......@@ -249,6 +252,7 @@
files = (
BF3C481D2A0A1FCD00CE128F /* LaunchScreen.storyboard in Resources */,
BF3C481A2A0A1FCD00CE128F /* Assets.xcassets in Resources */,
159D0F242A13B19C0029D0F7 /* 1200x680_jp_zadi.jpeg in Resources */,
BF3C48152A0A1FCA00CE128F /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="Pendu" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="1200x680_jp_zadi.jpeg" translatesAutoresizingMaskIntoConstraints="NO" id="pv2-ee-Khp">
<rect key="frame" x="0.0" y="-43" width="414" height="319"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
<textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="iRK-mL-RC3">
<rect key="frame" x="106" y="400" width="184" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<pickerView contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3TE-rS-qnG">
<rect key="frame" x="0.0" y="442" width="414" height="162"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
</pickerView>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QSN-AU-ceX">
<rect key="frame" x="308" y="402" width="33" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="filled" title="+"/>
<connections>
<action selector="ajouterAct:" destination="BYZ-38-t0r" eventType="touchUpInside" id="eWg-jI-G3G"/>
</connections>
</button>
<pickerView contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="LNU-nY-Uyk">
<rect key="frame" x="0.0" y="641" width="414" height="162"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
</pickerView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Choisissez un theme" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dAa-qb-1JB">
<rect key="frame" x="119" y="612" width="158" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="choissisez votre pseudo" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="doS-CU-ueI">
<rect key="frame" x="106" y="351" width="184" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lae-hh-psQ">
<rect key="frame" x="151" y="284" width="113" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="gray">
<attributedString key="attributedTitle">
<fragment content="Classement"/>
</attributedString>
</buttonConfiguration>
<connections>
<action selector="AfficherClassement:" destination="BYZ-38-t0r" eventType="touchUpInside" id="up5-UE-mBH"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Rxj-5T-1Nw">
<rect key="frame" x="117" y="796" width="181" height="54"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="filled" title="Lancer Partie"/>
<connections>
<action selector="LancerPartie:" destination="BYZ-38-t0r" eventType="touchUpInside" id="ccG-OM-Emx"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
<connections>
<outlet property="ajouterbtn" destination="QSN-AU-ceX" id="QV2-7a-fT3"/>
<outlet property="choixPseudo" destination="3TE-rS-qnG" id="5a3-TN-FpU"/>
<outlet property="choixTheme" destination="LNU-nY-Uyk" id="Fff-Y6-Z8A"/>
<outlet property="classement" destination="lae-hh-psQ" id="YEG-ma-abh"/>
<outlet property="pseudoinput" destination="iRK-mL-RC3" id="v77-OK-9QK"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="131.8840579710145" y="81.696428571428569"/>
</scene>
</scenes>
<resources>
<image name="1200x680_jp_zadi.jpeg" width="1200" height="680"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
......@@ -85,13 +85,18 @@ class GameEngine: NSObject {
return word
}
public func startNewGame(difficulty: String) -> Void {
print(WordToGuess(theme: "Animals", difficulty: "Easy"))
//public func startNewGame(difficulty: String) -> Void {
//wordToGuess = WordToGuess(theme: "Animals", difficulty: "Easy")
//}
public func guessLetter(letter: Character) -> Bool {
if wordToGuess.contains(letter) {
return true
} else {
return false
}
public func guessLetter(letter: Character) -> Void {
// Vérification de la lettre proposée par le joueur
// Mise à jour de l'état de la lettre
}
public func isGameOver() -> Bool {
......
......@@ -9,6 +9,32 @@ import UIKit
class ViewController: UIViewController {
@IBOutlet weak var classement: UIButton!
@IBOutlet weak var pseudoinput: UITextField!
@IBOutlet weak var ajouterbtn: UIButton!
@IBOutlet weak var choixPseudo: UIPickerView!
@IBOutlet weak var choixTheme: UIPickerView!
@IBAction func ajouterAct(_ sender: Any) {
}
@IBAction func LancerPartie(_ sender: Any) {
}
@IBAction func AfficherClassement(_ sender: Any) {
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment