parent
0c6d2f80d3
commit
8bd0b38862
@ -1,22 +0,0 @@
|
||||
//
|
||||
// File.swift
|
||||
//
|
||||
//
|
||||
// Created by etudiant on 25/01/2023.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public class Lecteur {
|
||||
init() {
|
||||
|
||||
}
|
||||
|
||||
public func lireInt() -> Int {
|
||||
Int(readLine())
|
||||
}
|
||||
|
||||
public func lireLigne() -> Int {
|
||||
readLine()
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
//
|
||||
// File.swift
|
||||
//
|
||||
//
|
||||
// Created by etudiant on 31/01/2023.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public class Afficheur {
|
||||
public init() {
|
||||
|
||||
}
|
||||
|
||||
public func afficherLigne(message msg: String){
|
||||
print(msg)
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
//
|
||||
// File.swift
|
||||
//
|
||||
//
|
||||
// Created by etudiant on 31/01/2023.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public class Lecteur {
|
||||
public init() {
|
||||
|
||||
}
|
||||
|
||||
public func lireInt() -> Int{
|
||||
if let value = readLine() {
|
||||
return Int(value) ?? -1
|
||||
} else {
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
public func lireLigne() -> String? {
|
||||
return readLine()
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
//
|
||||
// File.swift
|
||||
//
|
||||
//
|
||||
// Created by etudiant on 31/01/2023.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public protocol Rule {
|
||||
func executeRule() -> Bool
|
||||
}
|
Binary file not shown.
Loading…
Reference in new issue