Commit 7a378e5c by Julio Hermosa

Primera entrega del proyecto, contiene la versión para iOS de generala y el…

Primera entrega del proyecto, contiene la versión para iOS de generala y el archivo PDF con el desarrollo de los problemas s/ probabilidades planteados
parents
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
BBE636CC243FB205000E01F0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE636CB243FB205000E01F0 /* AppDelegate.swift */; };
BBE636CE243FB205000E01F0 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE636CD243FB205000E01F0 /* SceneDelegate.swift */; };
BBE636D0243FB205000E01F0 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE636CF243FB205000E01F0 /* ViewController.swift */; };
BBE636D3243FB205000E01F0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BBE636D1243FB205000E01F0 /* Main.storyboard */; };
BBE636D5243FB208000E01F0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BBE636D4243FB208000E01F0 /* Assets.xcassets */; };
BBE636D8243FB208000E01F0 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BBE636D6243FB208000E01F0 /* LaunchScreen.storyboard */; };
BBE636E0243FB25D000E01F0 /* Dado.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE636DF243FB25D000E01F0 /* Dado.swift */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
BBE636C8243FB205000E01F0 /* generala.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = generala.app; sourceTree = BUILT_PRODUCTS_DIR; };
BBE636CB243FB205000E01F0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
BBE636CD243FB205000E01F0 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
BBE636CF243FB205000E01F0 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
BBE636D2243FB205000E01F0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
BBE636D4243FB208000E01F0 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
BBE636D7243FB208000E01F0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
BBE636D9243FB208000E01F0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
BBE636DF243FB25D000E01F0 /* Dado.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dado.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
BBE636C5243FB205000E01F0 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
BBE636BF243FB204000E01F0 = {
isa = PBXGroup;
children = (
BBE636CA243FB205000E01F0 /* generala */,
BBE636C9243FB205000E01F0 /* Products */,
);
sourceTree = "<group>";
};
BBE636C9243FB205000E01F0 /* Products */ = {
isa = PBXGroup;
children = (
BBE636C8243FB205000E01F0 /* generala.app */,
);
name = Products;
sourceTree = "<group>";
};
BBE636CA243FB205000E01F0 /* generala */ = {
isa = PBXGroup;
children = (
BBE636CB243FB205000E01F0 /* AppDelegate.swift */,
BBE636CD243FB205000E01F0 /* SceneDelegate.swift */,
BBE636CF243FB205000E01F0 /* ViewController.swift */,
BBE636D1243FB205000E01F0 /* Main.storyboard */,
BBE636D4243FB208000E01F0 /* Assets.xcassets */,
BBE636D6243FB208000E01F0 /* LaunchScreen.storyboard */,
BBE636D9243FB208000E01F0 /* Info.plist */,
BBE636DF243FB25D000E01F0 /* Dado.swift */,
);
path = generala;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
BBE636C7243FB205000E01F0 /* generala */ = {
isa = PBXNativeTarget;
buildConfigurationList = BBE636DC243FB208000E01F0 /* Build configuration list for PBXNativeTarget "generala" */;
buildPhases = (
BBE636C4243FB205000E01F0 /* Sources */,
BBE636C5243FB205000E01F0 /* Frameworks */,
BBE636C6243FB205000E01F0 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = generala;
productName = generala;
productReference = BBE636C8243FB205000E01F0 /* generala.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
BBE636C0243FB204000E01F0 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1110;
LastUpgradeCheck = 1110;
ORGANIZATIONNAME = "Mobile Roshka";
TargetAttributes = {
BBE636C7243FB205000E01F0 = {
CreatedOnToolsVersion = 11.1;
};
};
};
buildConfigurationList = BBE636C3243FB204000E01F0 /* Build configuration list for PBXProject "generala" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = BBE636BF243FB204000E01F0;
productRefGroup = BBE636C9243FB205000E01F0 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
BBE636C7243FB205000E01F0 /* generala */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
BBE636C6243FB205000E01F0 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BBE636D8243FB208000E01F0 /* LaunchScreen.storyboard in Resources */,
BBE636D5243FB208000E01F0 /* Assets.xcassets in Resources */,
BBE636D3243FB205000E01F0 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
BBE636C4243FB205000E01F0 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BBE636D0243FB205000E01F0 /* ViewController.swift in Sources */,
BBE636E0243FB25D000E01F0 /* Dado.swift in Sources */,
BBE636CC243FB205000E01F0 /* AppDelegate.swift in Sources */,
BBE636CE243FB205000E01F0 /* SceneDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
BBE636D1243FB205000E01F0 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
BBE636D2243FB205000E01F0 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
BBE636D6243FB208000E01F0 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
BBE636D7243FB208000E01F0 /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
BBE636DA243FB208000E01F0 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
BBE636DB243FB208000E01F0 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
BBE636DD243FB208000E01F0 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = generala/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = roshka.generala;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
BBE636DE243FB208000E01F0 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = generala/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = roshka.generala;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
BBE636C3243FB204000E01F0 /* Build configuration list for PBXProject "generala" */ = {
isa = XCConfigurationList;
buildConfigurations = (
BBE636DA243FB208000E01F0 /* Debug */,
BBE636DB243FB208000E01F0 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
BBE636DC243FB208000E01F0 /* Build configuration list for PBXNativeTarget "generala" */ = {
isa = XCConfigurationList;
buildConfigurations = (
BBE636DD243FB208000E01F0 /* Debug */,
BBE636DE243FB208000E01F0 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = BBE636C0243FB204000E01F0 /* Project object */;
}
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:generala.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>generala.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
//
// AppDelegate.swift
// generala
//
// Created by Mobile Roshka on 4/9/20.
// Copyright © 2020 Mobile Roshka. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
// MARK: UISceneSession Lifecycle
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
}
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "dado-1.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "dado-2.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "dado-3.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "dado-4.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "dado-5.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "dado-6.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "dado-logo.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15400" 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="15404"/>
<capability name="Safe area layout guides" minToolsVersion="9.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" customModule="generala" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="22" translatesAutoresizingMaskIntoConstraints="NO" id="Yer-za-UT6">
<rect key="frame" x="19" y="414" width="376" height="202"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="53" translatesAutoresizingMaskIntoConstraints="NO" id="GTZ-aU-VVb">
<rect key="frame" x="0.0" y="0.0" width="376" height="90"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="i5b-bv-AFG">
<rect key="frame" x="0.0" y="0.0" width="90" height="90"/>
<constraints>
<constraint firstAttribute="width" constant="90" id="SiH-QW-w37"/>
<constraint firstAttribute="height" constant="90" id="WZ6-qx-YI1"/>
</constraints>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ht8-YF-QiU">
<rect key="frame" x="143" y="0.0" width="90" height="90"/>
<constraints>
<constraint firstAttribute="width" constant="90" id="TTr-Vz-cu5"/>
<constraint firstAttribute="height" constant="90" id="aW3-a7-79x"/>
</constraints>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Ph8-0g-4xt">
<rect key="frame" x="286" y="0.0" width="90" height="90"/>
<constraints>
<constraint firstAttribute="height" constant="90" id="bT3-uA-qJA"/>
<constraint firstAttribute="width" constant="90" id="uaM-9q-CRp"/>
</constraints>
</imageView>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" spacing="53" translatesAutoresizingMaskIntoConstraints="NO" id="Lqx-i9-gM9">
<rect key="frame" x="71.5" y="112" width="233" height="90"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="SCp-ww-RYb">
<rect key="frame" x="0.0" y="0.0" width="90" height="90"/>
<constraints>
<constraint firstAttribute="height" constant="90" id="dCL-qj-lgp"/>
<constraint firstAttribute="width" constant="90" id="gKf-A4-dV2"/>
</constraints>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="247-Pn-QmQ">
<rect key="frame" x="143" y="0.0" width="90" height="90"/>
<constraints>
<constraint firstAttribute="height" constant="90" id="WU2-dT-rGC"/>
<constraint firstAttribute="width" constant="90" id="d8T-1a-Vxn"/>
</constraints>
</imageView>
</subviews>
</stackView>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="w8m-YQ-h9a">
<rect key="frame" x="132" y="59" width="150" height="192"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="dado-logo" translatesAutoresizingMaskIntoConstraints="NO" id="eNa-Ls-HpD">
<rect key="frame" x="0.0" y="0.0" width="150" height="150"/>
<constraints>
<constraint firstAttribute="width" constant="150" id="LyI-3s-2AH"/>
<constraint firstAttribute="height" constant="150" id="y6x-2Z-cF8"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Generala" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Zzw-2X-dbO">
<rect key="frame" x="0.0" y="150" width="150" height="42"/>
<fontDescription key="fontDescription" type="system" pointSize="35"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="caS-8d-Xj1">
<rect key="frame" x="166.5" y="689" width="81" height="52"/>
<fontDescription key="fontDescription" type="system" pointSize="33"/>
<state key="normal" title="Jugar"/>
<connections>
<action selector="jugarBtnAction:" destination="BYZ-38-t0r" eventType="touchUpInside" id="Ha3-wm-iHO"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HIL-CD-h2M">
<rect key="frame" x="207" y="383" width="0.0" height="0.0"/>
<fontDescription key="fontDescription" type="system" pointSize="24"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="HIL-CD-h2M" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="4Zz-S7-CDD"/>
<constraint firstItem="caS-8d-Xj1" firstAttribute="top" secondItem="Yer-za-UT6" secondAttribute="bottom" constant="73" id="C75-Z5-w02"/>
<constraint firstItem="Yer-za-UT6" firstAttribute="top" secondItem="HIL-CD-h2M" secondAttribute="bottom" constant="31" id="DMQ-i2-qa7"/>
<constraint firstItem="caS-8d-Xj1" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="Khi-lN-6J3"/>
<constraint firstItem="w8m-YQ-h9a" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="Lac-ui-vEA"/>
<constraint firstItem="Yer-za-UT6" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="shO-yZ-NXT"/>
<constraint firstItem="w8m-YQ-h9a" firstAttribute="top" secondItem="6Tk-OE-BBY" secondAttribute="top" constant="15" id="w9e-AZ-t4F"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="bottom" secondItem="caS-8d-Xj1" secondAttribute="bottom" constant="121" id="zpJ-Nh-YGc"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<connections>
<outlet property="dado1" destination="i5b-bv-AFG" id="qIb-xV-O1Z"/>
<outlet property="dado2" destination="ht8-YF-QiU" id="Ssr-TP-jNB"/>
<outlet property="dado3" destination="Ph8-0g-4xt" id="LTT-aQ-Oal"/>
<outlet property="dado4" destination="SCp-ww-RYb" id="lFV-cS-SFM"/>
<outlet property="dado5" destination="247-Pn-QmQ" id="7AK-Tu-S39"/>
<outlet property="jugarBtn" destination="caS-8d-Xj1" id="9uz-Eu-ST1"/>
<outlet property="resultadoLbl" destination="HIL-CD-h2M" id="ZNn-Iv-ACl"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="131.8840579710145" y="107.8125"/>
</scene>
</scenes>
<resources>
<image name="dado-logo" width="530" height="525"/>
</resources>
</document>
//
// Dado.swift
// generala
//
// Created by Julio Hermosa on 4/9/20.
// Copyright © 2020 Mobile Roshka. All rights reserved.
//
import Foundation
class Dado{
//
var resultado = [Int]()//El array se carga al llamar a la función lanzarDado, con valores aleatorios del 1 al 6 (caras del dado). Cada posición de éste vector corresponde a un dado.
var valores: [Int: Int] = [1: 0, 2:0, 3:0, 4:0, 5:0, 6:0]//Diccionario con cada uno de los valores posibles de 'resultado', contabilizando las veces que se repiten los valores
//Para cargar los valores del array resultado de manera manual
//var resultado: [Int] = [1,2,3,5,4]
var resultadoOrdenado = [Int]()//Se ordena el array 'resultado' de manera creciente
//Los siguientes diccionarios resultan a realizar un filtro del diccionario de valores
var par = [Int:Int]() // Cantidad de pares y sus valores, se utiliza para la combinación 'Full'
var trio = [Int:Int]() // Valores que aparecen en 3 ocasiones
var poker = [Int:Int]() // Valores que aparecen en 4 ocasiones
var generala = [Int:Int]() // Valores que aparecen en 5 ocasiones
var retorno = "Nada" // Ninguna combinación
//Simulamos el lanzamiento de 5 dados, cuyos resultados se cargan en el array 'resultado' y en el diccionario de valores
func lanzarDado(){
//var resultado = [Int]()
//Cargamos los arrays de resultado
for index in 0...4{
resultado.append(Int.random(in: 1...6))
resultadoOrdenado.append(resultado[index])
}
//ordenamos el resultado
resultadoOrdenado.sort()
//Recorremos el array contabilizando repeticiones de valores
for i in 1...4 {
if valores[resultadoOrdenado[i]] == 0{
valores[resultadoOrdenado[i]]! += 1
}
if resultadoOrdenado[i] == resultadoOrdenado[i-1]{
valores[resultadoOrdenado[i]]! += 1
}
}
//filtramos el diccionario de valores segun su cantidad cargando en su combinación correspondiente
par = valores.filter { $0.value == 2}
trio = valores.filter { $0.value == 3}
poker = valores.filter { $0.value == 4}
generala = valores.filter { $0.value == 5}
//print (resultado)
//print (resultadoOrdenado)
}
//La función obtenerResultado devuelve el nombre de la combinación obtenida
func obtenerResultado()->String{
if trio.count == 1 && par.count == 1{
retorno = "Full"
}
if poker.count == 1{
retorno = "Poker"
}
if generala.count == 1{
retorno = "Generala"
}
let escaleraMenor: [Int] = [1, 2, 3, 4, 5]
let escalera: [Int] = [2, 3, 4, 5, 6]
let escaleraMayor: [Int] = [3, 4, 5, 6, 1]
if resultadoOrdenado == escaleraMenor || resultadoOrdenado == escalera || resultadoOrdenado == escaleraMayor{
retorno = "Escalera"
}
return retorno
}
//Removemos todos los valores obtenidos por el usuario para volver a jugar
func reiniciar(){
resultado.removeAll()
resultadoOrdenado.removeAll()
for index in 1...6 {
valores[index] = 0
}
retorno = "Nada"
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
//
// SceneDelegate.swift
// generala
//
// Created by Mobile Roshka on 4/9/20.
// Copyright © 2020 Mobile Roshka. All rights reserved.
//
import UIKit
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
guard let _ = (scene as? UIWindowScene) else { return }
}
func sceneDidDisconnect(_ scene: UIScene) {
// Called as the scene is being released by the system.
// This occurs shortly after the scene enters the background, or when its session is discarded.
// Release any resources associated with this scene that can be re-created the next time the scene connects.
// The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead).
}
func sceneDidBecomeActive(_ scene: UIScene) {
// Called when the scene has moved from an inactive state to an active state.
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
}
func sceneWillResignActive(_ scene: UIScene) {
// Called when the scene will move from an active state to an inactive state.
// This may occur due to temporary interruptions (ex. an incoming phone call).
}
func sceneWillEnterForeground(_ scene: UIScene) {
// Called as the scene transitions from the background to the foreground.
// Use this method to undo the changes made on entering the background.
}
func sceneDidEnterBackground(_ scene: UIScene) {
// Called as the scene transitions from the foreground to the background.
// Use this method to save data, release shared resources, and store enough scene-specific state information
// to restore the scene back to its current state.
}
}
//
// ViewController.swift
// generala
//
// Created by Julio Hermosa on 4/9/20.
// Copyright © 2020 Mobile Roshka. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
//inicializamos un dado, del tipo Dado
var dado = Dado.init()
@IBOutlet weak var jugarBtn: UIButton!
//Se cargan las imagenes de los dados segun el resultado obtenido
@IBOutlet weak var dado1: UIImageView!
@IBOutlet weak var dado2: UIImageView!
@IBOutlet weak var dado3: UIImageView!
@IBOutlet weak var dado4: UIImageView!
@IBOutlet weak var dado5: UIImageView!
//Botón para iniciar juego, llama a la función jugar
@IBAction func jugarBtnAction(_ sender: Any) {
jugar()
}
@IBOutlet weak var resultadoLbl: UILabel!
//Función jugar, se realizan las operaciones de lanzamiento de los dados, carga de imagenes de los dados y se imprime si hay alguna combinación en el label resultadoLbl
func jugar(){
dado.lanzarDado() //Se carga el resultado de los lanzamientos
//print(dado.obtenerResultado())
resultadoLbl.text = dado.obtenerResultado()
dado1.image = UIImage(named: "dado-\(dado.resultado[0])")
dado2.image = UIImage(named: "dado-\(dado.resultado[1])")
dado3.image = UIImage(named: "dado-\(dado.resultado[2])")
dado4.image = UIImage(named: "dado-\(dado.resultado[3])")
dado5.image = UIImage(named: "dado-\(dado.resultado[4])")
dado.reiniciar()//Borramos todos los datos del usuario para que se pueda volver a jugar
}
override func viewDidLoad() {
super.viewDidLoad()
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment