mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:47:45 +00:00
LibChess: Use new format functions.
This commit is contained in:
parent
805ed03b48
commit
43e37c7cde
2 changed files with 12 additions and 12 deletions
|
@ -202,23 +202,23 @@ String GoCommand::to_string() const
|
||||||
if (ponder)
|
if (ponder)
|
||||||
builder.append(" ponder");
|
builder.append(" ponder");
|
||||||
if (wtime.has_value())
|
if (wtime.has_value())
|
||||||
builder.appendf(" wtime %i", wtime.value());
|
builder.appendff(" wtime {}", wtime.value());
|
||||||
if (btime.has_value())
|
if (btime.has_value())
|
||||||
builder.appendf(" btime %i", btime.value());
|
builder.appendff(" btime {}", btime.value());
|
||||||
if (winc.has_value())
|
if (winc.has_value())
|
||||||
builder.appendf(" winc %i", winc.value());
|
builder.appendff(" winc {}", winc.value());
|
||||||
if (binc.has_value())
|
if (binc.has_value())
|
||||||
builder.appendf(" binc %i", binc.value());
|
builder.appendff(" binc {}", binc.value());
|
||||||
if (movestogo.has_value())
|
if (movestogo.has_value())
|
||||||
builder.appendf(" movestogo %i", movestogo.value());
|
builder.appendff(" movestogo {}", movestogo.value());
|
||||||
if (depth.has_value())
|
if (depth.has_value())
|
||||||
builder.appendf(" depth %i", depth.value());
|
builder.appendff(" depth {}", depth.value());
|
||||||
if (nodes.has_value())
|
if (nodes.has_value())
|
||||||
builder.appendf(" nodes %i", nodes.value());
|
builder.appendff(" nodes {}", nodes.value());
|
||||||
if (mate.has_value())
|
if (mate.has_value())
|
||||||
builder.appendf(" mate %i", mate.value());
|
builder.appendff(" mate {}", mate.value());
|
||||||
if (movetime.has_value())
|
if (movetime.has_value())
|
||||||
builder.appendf(" movetime %i", movetime.value());
|
builder.appendff(" movetime {}", movetime.value());
|
||||||
if (infinite)
|
if (infinite)
|
||||||
builder.append(" infinite");
|
builder.append(" infinite");
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ Endpoint::Endpoint(NonnullRefPtr<Core::IODevice> in, NonnullRefPtr<Core::IODevic
|
||||||
void Endpoint::send_command(const Command& command)
|
void Endpoint::send_command(const Command& command)
|
||||||
{
|
{
|
||||||
#ifdef UCI_DEBUG
|
#ifdef UCI_DEBUG
|
||||||
dbg() << class_name() << " Sent UCI Command: " << String(command.to_string().characters(), Chomp);
|
dbgln("{} Sent UCI Command: {}", class_name(), String(command.to_string().characters(), Chomp));
|
||||||
#endif
|
#endif
|
||||||
m_out->write(command.to_string());
|
m_out->write(command.to_string());
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ NonnullOwnPtr<Command> Endpoint::read_command()
|
||||||
String line(ReadonlyBytes(m_in->read_line(4096).bytes()), Chomp);
|
String line(ReadonlyBytes(m_in->read_line(4096).bytes()), Chomp);
|
||||||
|
|
||||||
#ifdef UCI_DEBUG
|
#ifdef UCI_DEBUG
|
||||||
dbg() << class_name() << " Received UCI Command: " << line;
|
dbgln("{} Received UCI Command: {}", class_name(), line);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (line == "uci") {
|
if (line == "uci") {
|
||||||
|
@ -125,7 +125,7 @@ NonnullOwnPtr<Command> Endpoint::read_command()
|
||||||
return make<InfoCommand>(InfoCommand::from_string(line));
|
return make<InfoCommand>(InfoCommand::from_string(line));
|
||||||
}
|
}
|
||||||
|
|
||||||
dbg() << "command line: " << line;
|
dbgln("command line: {}", line);
|
||||||
ASSERT_NOT_REACHED();
|
ASSERT_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue