|
|
|
@ -1,139 +1,394 @@
|
|
|
|
|
package com.iqball.app.page
|
|
|
|
|
|
|
|
|
|
import androidx.compose.foundation.BorderStroke
|
|
|
|
|
import androidx.compose.foundation.Canvas
|
|
|
|
|
import androidx.compose.foundation.background
|
|
|
|
|
import androidx.compose.foundation.border
|
|
|
|
|
import androidx.compose.foundation.layout.Arrangement
|
|
|
|
|
import androidx.compose.foundation.layout.Box
|
|
|
|
|
import androidx.compose.runtime.Composable
|
|
|
|
|
import androidx.compose.foundation.layout.Column
|
|
|
|
|
import androidx.compose.foundation.layout.PaddingValues
|
|
|
|
|
import androidx.compose.foundation.layout.Row
|
|
|
|
|
import androidx.compose.foundation.layout.fillMaxHeight
|
|
|
|
|
import androidx.compose.foundation.layout.fillMaxSize
|
|
|
|
|
import androidx.compose.foundation.layout.Spacer
|
|
|
|
|
import androidx.compose.foundation.layout.fillMaxWidth
|
|
|
|
|
import androidx.compose.foundation.layout.padding
|
|
|
|
|
import androidx.compose.foundation.layout.size
|
|
|
|
|
import androidx.compose.foundation.lazy.staggeredgrid.LazyVerticalStaggeredGrid
|
|
|
|
|
import androidx.compose.foundation.lazy.staggeredgrid.StaggeredGridCells
|
|
|
|
|
import androidx.compose.foundation.lazy.staggeredgrid.items
|
|
|
|
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
|
|
|
|
import androidx.compose.material3.Divider
|
|
|
|
|
import androidx.compose.material3.Button
|
|
|
|
|
import androidx.compose.material3.ButtonDefaults
|
|
|
|
|
import androidx.core.graphics.toColorInt
|
|
|
|
|
import androidx.compose.material3.CenterAlignedTopAppBar
|
|
|
|
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
|
|
|
|
import androidx.compose.material3.MaterialTheme
|
|
|
|
|
import androidx.compose.material3.OutlinedButton
|
|
|
|
|
import androidx.compose.material3.Scaffold
|
|
|
|
|
import androidx.compose.material3.Text
|
|
|
|
|
import androidx.compose.runtime.Composable
|
|
|
|
|
import androidx.compose.ui.Alignment
|
|
|
|
|
import androidx.compose.material3.TopAppBarDefaults
|
|
|
|
|
import androidx.compose.material3.TopAppBarDefaults.pinnedScrollBehavior
|
|
|
|
|
import androidx.compose.material3.rememberTopAppBarState
|
|
|
|
|
import androidx.compose.runtime.getValue
|
|
|
|
|
import androidx.compose.runtime.mutableStateOf
|
|
|
|
|
import androidx.compose.ui.Modifier
|
|
|
|
|
import androidx.compose.ui.graphics.Color
|
|
|
|
|
import androidx.compose.ui.graphics.RectangleShape
|
|
|
|
|
import androidx.compose.ui.graphics.Shape
|
|
|
|
|
import androidx.compose.ui.res.stringResource
|
|
|
|
|
import androidx.compose.ui.text.font.FontWeight
|
|
|
|
|
import androidx.compose.ui.tooling.preview.Preview
|
|
|
|
|
import androidx.compose.ui.text.style.TextOverflow
|
|
|
|
|
import androidx.compose.ui.unit.dp
|
|
|
|
|
import androidx.compose.ui.unit.sp
|
|
|
|
|
import com.iqball.app.R
|
|
|
|
|
import com.iqball.app.ui.theme.Orange
|
|
|
|
|
import com.iqball.app.model.Tactic
|
|
|
|
|
import com.iqball.app.model.Team
|
|
|
|
|
import androidx.compose.runtime.remember
|
|
|
|
|
import androidx.compose.runtime.setValue
|
|
|
|
|
import androidx.compose.ui.Alignment
|
|
|
|
|
import androidx.compose.ui.draw.shadow
|
|
|
|
|
import androidx.compose.ui.graphics.RectangleShape
|
|
|
|
|
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
|
|
|
|
import androidx.compose.ui.text.font.FontWeight
|
|
|
|
|
import androidx.compose.ui.text.style.TextAlign
|
|
|
|
|
import androidx.compose.ui.unit.TextUnit
|
|
|
|
|
import arrow.core.Either
|
|
|
|
|
import coil.compose.AsyncImage
|
|
|
|
|
import com.iqball.app.api.service.AuthService
|
|
|
|
|
import com.iqball.app.api.service.IQBallService
|
|
|
|
|
import com.iqball.app.api.service.UserService
|
|
|
|
|
import kotlinx.coroutines.runBlocking
|
|
|
|
|
import java.time.Instant
|
|
|
|
|
import java.time.LocalDateTime
|
|
|
|
|
import java.time.ZoneId
|
|
|
|
|
import java.time.format.DateTimeFormatter
|
|
|
|
|
|
|
|
|
|
@Preview
|
|
|
|
|
@OptIn(ExperimentalMaterial3Api::class)
|
|
|
|
|
@Composable
|
|
|
|
|
fun DisplayHomePage() {
|
|
|
|
|
HomePage()
|
|
|
|
|
}
|
|
|
|
|
fun HomePage(service: IQBallService) {
|
|
|
|
|
val tactics: List<Tactic>
|
|
|
|
|
val teams: List<Team>
|
|
|
|
|
var invalid = false
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
|
fun HomePage() {
|
|
|
|
|
Column {
|
|
|
|
|
AppHeader()
|
|
|
|
|
PersonalSpace()
|
|
|
|
|
PersonalSpaceMenu()
|
|
|
|
|
val data = getDataFromApi(service)
|
|
|
|
|
if (data == null) {
|
|
|
|
|
tactics = listOf<Tactic>()
|
|
|
|
|
teams = listOf<Team>()
|
|
|
|
|
invalid = true
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
tactics = data.tactics
|
|
|
|
|
teams = data.teams
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val scrollBehavior = pinnedScrollBehavior(rememberTopAppBarState())
|
|
|
|
|
Scaffold(
|
|
|
|
|
modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection),
|
|
|
|
|
topBar = {
|
|
|
|
|
CenterAlignedTopAppBar(
|
|
|
|
|
colors = TopAppBarDefaults.topAppBarColors(
|
|
|
|
|
containerColor = MaterialTheme.colorScheme.primary,
|
|
|
|
|
titleContentColor = MaterialTheme.colorScheme.secondary,
|
|
|
|
|
),
|
|
|
|
|
title = {
|
|
|
|
|
Text(
|
|
|
|
|
"IQBall",
|
|
|
|
|
fontSize = 40.sp,
|
|
|
|
|
maxLines = 1,
|
|
|
|
|
overflow = TextOverflow.Ellipsis
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
scrollBehavior = scrollBehavior
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
) { innerPadding ->
|
|
|
|
|
Body(innerPadding, tactics, teams, invalid)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
|
fun AppHeader() {
|
|
|
|
|
Box(
|
|
|
|
|
fun Body(padding: PaddingValues, tactics: List<Tactic>, teams: List<Team>, invalid: Boolean) {
|
|
|
|
|
Column(
|
|
|
|
|
modifier = Modifier
|
|
|
|
|
.background(Color.DarkGray)
|
|
|
|
|
.fillMaxWidth(),
|
|
|
|
|
contentAlignment = Alignment.Center
|
|
|
|
|
.padding(padding)
|
|
|
|
|
) {
|
|
|
|
|
Row {
|
|
|
|
|
Text(
|
|
|
|
|
text = stringResource(R.string.app_name),
|
|
|
|
|
color = Orange,
|
|
|
|
|
fontWeight = FontWeight.Bold,
|
|
|
|
|
fontSize = 25.sp
|
|
|
|
|
)
|
|
|
|
|
//rajouter petit bonhomme avec le nom
|
|
|
|
|
var isTactics by remember { mutableStateOf(true) }
|
|
|
|
|
TabButtons(isTactics) { newIsTactic ->
|
|
|
|
|
isTactics = newIsTactic
|
|
|
|
|
}
|
|
|
|
|
if (isTactics) {
|
|
|
|
|
ListTacticCard(tactics)
|
|
|
|
|
} else {
|
|
|
|
|
ListTeamCard(teams)
|
|
|
|
|
}
|
|
|
|
|
if (invalid) {
|
|
|
|
|
TextCentered(text = "Erreur : Aucune connexion internet. Veillez activer votre connexion internet puis relancer l'application", fontSize = 20.sp )
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
|
fun PersonalSpace() {
|
|
|
|
|
Box(
|
|
|
|
|
fun TabButtons(isTactics: Boolean, onToggle: (Boolean) -> Unit) {
|
|
|
|
|
Row(
|
|
|
|
|
horizontalArrangement = Arrangement.Center,
|
|
|
|
|
modifier = Modifier
|
|
|
|
|
.background(Color.Gray)
|
|
|
|
|
.fillMaxWidth(),
|
|
|
|
|
contentAlignment = Alignment.Center
|
|
|
|
|
.padding(top = 10.dp, start = 2.dp, end = 2.dp)
|
|
|
|
|
.fillMaxWidth()
|
|
|
|
|
.padding(top = 10.dp, bottom = 10.dp)
|
|
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
|
|
|
|
Text(
|
|
|
|
|
text = stringResource(R.string.espace_personnel),
|
|
|
|
|
color = Color.White,
|
|
|
|
|
fontWeight = FontWeight.Bold,
|
|
|
|
|
fontSize = 15.sp,
|
|
|
|
|
modifier = Modifier.padding(5.dp)
|
|
|
|
|
val tacticTitle = "Espace personnel"
|
|
|
|
|
val teamTitle = "Mes équipes"
|
|
|
|
|
val spaceButton = 5.dp
|
|
|
|
|
if (isTactics) {
|
|
|
|
|
FilledButton(tacticTitle) {}
|
|
|
|
|
Spacer(
|
|
|
|
|
modifier = Modifier
|
|
|
|
|
.padding(spaceButton)
|
|
|
|
|
)
|
|
|
|
|
Box(
|
|
|
|
|
OutlinedButton(teamTitle) {
|
|
|
|
|
onToggle(false)
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
OutlinedButton(tacticTitle) {
|
|
|
|
|
onToggle(true)
|
|
|
|
|
}
|
|
|
|
|
Spacer(
|
|
|
|
|
modifier = Modifier
|
|
|
|
|
.border(2.dp, Color.Black, RoundedCornerShape(5.dp))
|
|
|
|
|
.fillMaxWidth(),
|
|
|
|
|
contentAlignment = Alignment.Center
|
|
|
|
|
) {
|
|
|
|
|
Text(
|
|
|
|
|
text = "Aucune tactique créée !",
|
|
|
|
|
fontSize = 10.sp,
|
|
|
|
|
modifier = Modifier.padding(5.dp)
|
|
|
|
|
.padding(spaceButton)
|
|
|
|
|
)
|
|
|
|
|
FilledButton(teamTitle) {}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
|
fun ListTacticCard(tactics: List<Tactic>) {
|
|
|
|
|
LazyVerticalStaggeredGrid(
|
|
|
|
|
columns = StaggeredGridCells.Fixed(2),
|
|
|
|
|
modifier = Modifier
|
|
|
|
|
.padding(5.dp),
|
|
|
|
|
content = {
|
|
|
|
|
items(tactics) { tactic ->
|
|
|
|
|
TacticCard(tactic)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
|
fun PersonalSpaceMenu() {
|
|
|
|
|
Box(
|
|
|
|
|
fun ListTeamCard(teams: List<Team>) {
|
|
|
|
|
LazyVerticalStaggeredGrid(
|
|
|
|
|
columns = StaggeredGridCells.Fixed(2),
|
|
|
|
|
modifier = Modifier
|
|
|
|
|
.fillMaxSize()
|
|
|
|
|
.background(Color.LightGray)
|
|
|
|
|
.padding(5.dp),
|
|
|
|
|
content = {
|
|
|
|
|
items(teams) { team ->
|
|
|
|
|
TeamCard(team)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
|
fun TacticCard(tactic: Tactic) {
|
|
|
|
|
Column(
|
|
|
|
|
modifier = Modifier
|
|
|
|
|
.padding(5.dp)
|
|
|
|
|
.border(
|
|
|
|
|
border = BorderStroke(1.dp, Color(0xFFDADCE0)),
|
|
|
|
|
shape = RoundedCornerShape(8.dp)
|
|
|
|
|
)
|
|
|
|
|
.shadow(1.dp, shape = RoundedCornerShape(8.dp))
|
|
|
|
|
.background(
|
|
|
|
|
color = Color(0xFFFFFFFF)
|
|
|
|
|
)
|
|
|
|
|
.padding(15.dp)
|
|
|
|
|
) {
|
|
|
|
|
Column {
|
|
|
|
|
Row {
|
|
|
|
|
TextCentered(text = tactic.name, fontSize = 16.sp)
|
|
|
|
|
}
|
|
|
|
|
Row {
|
|
|
|
|
Box(
|
|
|
|
|
val date =LocalDateTime.ofInstant(Instant.ofEpochMilli(tactic.creationDate), ZoneId.systemDefault())
|
|
|
|
|
val dateFormatted = date.format(DateTimeFormatter.ofPattern("dd/MM/yyyy kk:mm"))
|
|
|
|
|
TextCentered(text = dateFormatted , fontSize = 10.sp, fontWeight = FontWeight.Bold, modifier = Modifier.padding(2.dp))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
|
fun TeamCard(team: Team) {
|
|
|
|
|
var mainColor = Color.White
|
|
|
|
|
var secondColor = Color.White
|
|
|
|
|
var validMain = true
|
|
|
|
|
var validSecond = true
|
|
|
|
|
try {
|
|
|
|
|
mainColor = Color(team.getMainColor().toColorInt())
|
|
|
|
|
} catch (e : Exception) {
|
|
|
|
|
validMain = false
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
secondColor = Color(team.getSecondColor().toColorInt())
|
|
|
|
|
} catch (e : Exception) {
|
|
|
|
|
validSecond = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Column(
|
|
|
|
|
modifier = Modifier
|
|
|
|
|
.background(Color.DarkGray)
|
|
|
|
|
.padding(5.dp)
|
|
|
|
|
.border(
|
|
|
|
|
border = BorderStroke(1.dp, Color(0xFFDADCE0)),
|
|
|
|
|
shape = RoundedCornerShape(8.dp)
|
|
|
|
|
)
|
|
|
|
|
.shadow(1.dp, shape = RoundedCornerShape(8.dp))
|
|
|
|
|
.background(
|
|
|
|
|
color = Color(0xFFFFFFFF)
|
|
|
|
|
)
|
|
|
|
|
.padding(15.dp)
|
|
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
Text(text = "Mes équipes")
|
|
|
|
|
}
|
|
|
|
|
Divider(
|
|
|
|
|
modifier = Modifier.align(Alignment.Bottom),
|
|
|
|
|
color = Color.DarkGray,
|
|
|
|
|
thickness = 3.dp
|
|
|
|
|
AsyncImage(
|
|
|
|
|
model = team.getPicture(),
|
|
|
|
|
contentDescription = null,
|
|
|
|
|
modifier = Modifier
|
|
|
|
|
.fillMaxWidth()
|
|
|
|
|
.border(
|
|
|
|
|
border = BorderStroke(1.dp, Color(0xFFDADCE0)),
|
|
|
|
|
shape = RectangleShape
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
//ajouter button add si jamais on fait ajout team en android
|
|
|
|
|
TextCentered(text = team.getName())
|
|
|
|
|
Row {
|
|
|
|
|
TeamColorCard("Couleur principale", mainColor, 0.5f)
|
|
|
|
|
TeamColorCard("Couleur secondaire", secondColor)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!validMain || !validSecond) {
|
|
|
|
|
TextCentered(text = "Erreur : Format des couleurs invalides", fontSize = 16.sp)
|
|
|
|
|
}
|
|
|
|
|
Row {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
|
fun TeamColorCard(text: String, color: Color, fraction : Float = 1f) {
|
|
|
|
|
Column(
|
|
|
|
|
modifier = Modifier
|
|
|
|
|
.fillMaxWidth(fraction)
|
|
|
|
|
) {
|
|
|
|
|
Box(
|
|
|
|
|
contentAlignment = Alignment.Center,
|
|
|
|
|
modifier = Modifier
|
|
|
|
|
.background(Color.DarkGray)
|
|
|
|
|
.padding(5.dp)
|
|
|
|
|
.fillMaxWidth()
|
|
|
|
|
.padding(2.dp)
|
|
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
Text(text = "Mes dernières stratégies")
|
|
|
|
|
Canvas(
|
|
|
|
|
modifier = Modifier.size(30.dp),
|
|
|
|
|
onDraw = {
|
|
|
|
|
drawCircle(color = color)
|
|
|
|
|
}
|
|
|
|
|
Divider(
|
|
|
|
|
modifier = Modifier.align(Alignment.Bottom),
|
|
|
|
|
color = Color.DarkGray,
|
|
|
|
|
thickness = 3.dp
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
TextCentered(text = text, fontSize = 6.sp)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
|
fun FilledButton(text: String, onClick: () -> Unit) {
|
|
|
|
|
Button(
|
|
|
|
|
colors = ButtonDefaults.buttonColors(
|
|
|
|
|
containerColor = MaterialTheme.colorScheme.tertiary,
|
|
|
|
|
),
|
|
|
|
|
onClick = { onClick() }
|
|
|
|
|
) {
|
|
|
|
|
Text(text)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
|
fun OutlinedButton(text: String, onClick: () -> Unit) {
|
|
|
|
|
OutlinedButton(
|
|
|
|
|
border = BorderStroke(
|
|
|
|
|
1.dp,
|
|
|
|
|
color = MaterialTheme.colorScheme.tertiary
|
|
|
|
|
),
|
|
|
|
|
colors = ButtonDefaults.outlinedButtonColors(
|
|
|
|
|
contentColor = MaterialTheme.colorScheme.tertiary
|
|
|
|
|
),
|
|
|
|
|
onClick = { onClick() }) {
|
|
|
|
|
Text(text)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
|
fun TextCentered( modifier: Modifier = Modifier, text: String, fontSize: TextUnit = 18.sp, fontWeight: FontWeight? = null) {
|
|
|
|
|
Text(text = text,
|
|
|
|
|
modifier = modifier
|
|
|
|
|
.fillMaxWidth(),
|
|
|
|
|
textAlign = TextAlign.Center,
|
|
|
|
|
fontSize = fontSize,
|
|
|
|
|
fontWeight = fontWeight
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun getDataFromApi(service: IQBallService) : UserService.UserDataResponse?{
|
|
|
|
|
var res : UserService.UserDataResponse? = null
|
|
|
|
|
try {
|
|
|
|
|
runBlocking {
|
|
|
|
|
val result = service.login(AuthService.LoginRequest("yanis@mail.com", "123456"))
|
|
|
|
|
when (result) {
|
|
|
|
|
is Either.Left -> null
|
|
|
|
|
is Either.Right -> {
|
|
|
|
|
val data = service.getUserData(result.value.token)
|
|
|
|
|
when (data) {
|
|
|
|
|
is Either.Left -> null
|
|
|
|
|
is Either.Right -> {
|
|
|
|
|
res = data.value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return res
|
|
|
|
|
} catch (error : Exception) {
|
|
|
|
|
return res
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun getStubTeam() : ArrayList<Team> {
|
|
|
|
|
val teams = ArrayList<Team>()
|
|
|
|
|
teams.addAll(
|
|
|
|
|
listOf(
|
|
|
|
|
Team(1, "equipe1", "https://www.shutterstock.com/image-vector/batman-logo-icon-vector-template-600nw-1998917738.jpg", "#4500FF", "#456789"),
|
|
|
|
|
Team(2, "equipe2", "https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/2f899b52-daf8-4098-83fe-5c5e27b69915/d4s4nzj-5f915488-7462-4908-b3c5-1605b0e4dc32.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOjdlMGQxODg5ODIyNjQzNzNhNWYwZDQxNWVhMGQyNmUwIiwiaXNzIjoidXJuOmFwcDo3ZTBkMTg4OTgyMjY0MzczYTVmMGQ0MTVlYTBkMjZlMCIsIm9iaiI6W1t7InBhdGgiOiJcL2ZcLzJmODk5YjUyLWRhZjgtNDA5OC04M2ZlLTVjNWUyN2I2OTkxNVwvZDRzNG56ai01ZjkxNTQ4OC03NDYyLTQ5MDgtYjNjNS0xNjA1YjBlNGRjMzIuanBnIn1dXSwiYXVkIjpbInVybjpzZXJ2aWNlOmZpbGUuZG93bmxvYWQiXX0.KqdQgobH9kzyMIeYIneNdyWgKTpGbztwSKqK5pO3YYs", "121212", "#564738"),
|
|
|
|
|
Team(3, "equipe3", "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ1jiizrhhGsr48WrxxBbDpkFrRKeAYlGgcNQ&usqp=CAU", "#987654", "121212"),
|
|
|
|
|
Team(4, "equipe4", "https://www.shutterstock.com/image-vector/batman-logo-icon-vector-template-600nw-1998917738.jpg", "121212", "121212")
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
return teams
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun getStubTactic() : ArrayList<Tactic> {
|
|
|
|
|
val tactics = ArrayList<Tactic>()
|
|
|
|
|
tactics.addAll(
|
|
|
|
|
listOf(
|
|
|
|
|
Tactic(1, "Test", 1, "testType", 1),
|
|
|
|
|
Tactic(2, "Test2", 1, "testType", 1),
|
|
|
|
|
Tactic(3, "Test3", 4, "test23Type", 1),
|
|
|
|
|
Tactic(3, "Test6", 4, "test23Type", 1),
|
|
|
|
|
Tactic(1, "Test", 1, "testType", 1),
|
|
|
|
|
Tactic(2, "Test2", 1, "testType", 1),
|
|
|
|
|
Tactic(3, "Test3", 4, "test23Type", 1),
|
|
|
|
|
Tactic(3, "Test6", 4, "test23Type", 1),
|
|
|
|
|
Tactic(1, "Test", 1, "testType", 1),
|
|
|
|
|
Tactic(2, "Test2", 1, "testType", 1),
|
|
|
|
|
Tactic(3, "Test3", 4, "test23Type", 1),
|
|
|
|
|
Tactic(3, "Test6", 4, "test23Type", 1),
|
|
|
|
|
Tactic(1, "Test", 1, "testType", 1),
|
|
|
|
|
Tactic(2, "Test2", 1, "testType", 1),
|
|
|
|
|
Tactic(3, "Test3", 4, "test23Type", 1),
|
|
|
|
|
Tactic(3, "Test6", 4, "test23Type", 1),
|
|
|
|
|
Tactic(1, "Test", 1, "testType", 1),
|
|
|
|
|
Tactic(2, "Test2", 1, "testType", 1),
|
|
|
|
|
Tactic(3, "Test3", 4, "test23Type", 1),
|
|
|
|
|
Tactic(3, "Test6", 4, "test23Type", 1)
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
return tactics
|
|
|
|
|
}
|