Skip to content

Commit

Permalink
style: style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromsantos committed Jan 10, 2024
1 parent 5996260 commit f076136
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 20 deletions.
14 changes: 7 additions & 7 deletions 12_Raid/kata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,33 @@ public List<Raid> GetRaidsByGuildMember(GuildMember other)
return RaidDao.FindRaidsBy(other);
}

return new List<Raid>();
return [];
}
}

public class GuildMember
{
private readonly List<Raid> _raids = new();
private readonly List<GuildMember> _friends = new();
private readonly List<Raid> raids = [];
private readonly List<GuildMember> friends = new();

public IEnumerable<GuildMember> GetFriends()
{
return _friends;
return friends;
}

public void AddFriend(GuildMember member)
{
_friends.Add(member);
friends.Add(member);
}

public void AddRaid(Raid raid)
{
_raids.Add(raid);
raids.Add(raid);
}

public IEnumerable<Raid> GetRaids()
{
return _raids;
return raids;
}
}

Expand Down
16 changes: 8 additions & 8 deletions 15_TicTacToeMock/kata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,25 @@ public enum Column

public class Coordinate
{
private Row _row;
private Column _column;
private Row row;
private Column column;

public Coordinate(Row row, Column column)
{
_row = row;
_column = column;
this.row = row;
this.column = column;
}
}

public class Play
{
private Player _player;
private Coordinate _coordinate;
private Player player;
private Coordinate coordinate;

public Play(Player player, Coordinate coordinate)
{
_player = player;
_coordinate = coordinate;
this.player = player;
this.coordinate = coordinate;
}
}

Expand Down
6 changes: 3 additions & 3 deletions 18_SmellyTicTacToe/kata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ public class Tile

public class Board
{
private readonly List<Tile> plays = new List<Tile>();
private readonly List<Tile> plays = [];

public Board()
{
for (int i = 0; i < 3; i++)
for (var i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
for (var j = 0; j < 3; j++)
{
plays.Add(new Tile { X = i, Y = j, Symbol = ' ' });
}
Expand Down
6 changes: 4 additions & 2 deletions 19_SocialNetwork/UseCases/SocialNetworkUseCases.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace SocialNetworkKata.UseCases;

public interface IUseCase {
void Execute(string command);
string query(string query);
}
string Query(string query);
}

0 comments on commit f076136

Please sign in to comment.